diff options
author | Luca Boccassi <luca.boccassi@microsoft.com> | 2021-03-22 23:36:01 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-22 23:36:01 +0100 |
commit | d4bb2b0b4e1c47bdf5bba0ec2d7518b68732dd18 (patch) | |
tree | 3ad3127f608810703dec3ca6f55c595920429d32 | |
parent | Merge pull request #19058 from bugaevc/log-open-protect-errno (diff) | |
parent | man: say that .device units need udev (diff) | |
download | systemd-d4bb2b0b4e1c47bdf5bba0ec2d7518b68732dd18.tar.xz systemd-d4bb2b0b4e1c47bdf5bba0ec2d7518b68732dd18.zip |
Merge pull request #19081 from keszybz/three-comment-updates
Three comment updates
-rw-r--r-- | NEWS | 2 | ||||
-rw-r--r-- | man/systemd.device.xml | 25 | ||||
-rw-r--r-- | src/basic/log.c | 16 |
3 files changed, 19 insertions, 24 deletions
@@ -251,7 +251,7 @@ CHANGES WITH 248: be restored for individual services with NoExecPaths=/dev (or by allow- listing and excluding /dev from ExecPaths=). - * Permissions for /dev/vsock are now set to 0666, and /dev/vhost-vsock + * Permissions for /dev/vsock are now set to 0o666, and /dev/vhost-vsock and /dev/vhost-net are owned by the kvm group. * The hardware database has been extended with a list of fingerprint diff --git a/man/systemd.device.xml b/man/systemd.device.xml index 255ca3373b..596d334d5d 100644 --- a/man/systemd.device.xml +++ b/man/systemd.device.xml @@ -26,11 +26,10 @@ <refsect1> <title>Description</title> - <para>A unit configuration file whose name ends in - <literal>.device</literal> encodes information about a device unit - as exposed in the - sysfs/<citerefentry><refentrytitle>udev</refentrytitle><manvolnum>7</manvolnum></citerefentry> - device tree.</para> + <para>A unit configuration file whose name ends in <literal>.device</literal> encodes information about a + device unit as exposed in the + sysfs/<citerefentry><refentrytitle>udev</refentrytitle><manvolnum>7</manvolnum></citerefentry> device + tree. This may be used to define dependencies between devices and other units.</para> <para>This unit type has no specific options. See <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry> @@ -40,14 +39,10 @@ sections. A separate [Device] section does not exist, since no device-specific options may be configured.</para> - <para>systemd will dynamically create device units for all kernel - devices that are marked with the "systemd" udev tag (by default - all block and network devices, and a few others). This may be used - to define dependencies between devices and other units. To tag a - udev device, use <literal>TAG+="systemd"</literal> in the udev - rules file, see - <citerefentry><refentrytitle>udev</refentrytitle><manvolnum>7</manvolnum></citerefentry> - for details.</para> + <para>systemd will dynamically create device units for all kernel devices that are marked with the + <literal>systemd</literal> udev tag (by default all block and network devices, and a few others). Note + that <emphasis>if <filename>systemd-udev.service</filename> is not running, no device units will be + available (for example in a typical container)</emphasis>.</para> <para>Device units are named after the <filename>/sys/</filename> and <filename>/dev/</filename> paths they control. Example: the @@ -57,6 +52,10 @@ name see <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para> + <para>To tag a udev device, use <literal>TAG+="systemd"</literal> in the udev rules file, see + <citerefentry><refentrytitle>udev</refentrytitle><manvolnum>7</manvolnum></citerefentry> for details. + </para> + <para>Device units will be reloaded by systemd whenever the corresponding device generates a <literal>changed</literal> event. Other units can use <varname>ReloadPropagatedFrom=</varname> to react diff --git a/src/basic/log.c b/src/basic/log.c index 0e6023cff2..595db0c395 100644 --- a/src/basic/log.c +++ b/src/basic/log.c @@ -252,18 +252,14 @@ int log_open(void) { /* Do not call from library code. */ - /* This function is often called in preparation for being able - * to log. Let's make sure we don't clobber errno, so that a call - * to a logging function immediately following a log_open() call - * can still easily reference an error that happened immediately - * before the log_open() call. */ + /* This function is often called in preparation for logging. Let's make sure we don't clobber errno, + * so that a call to a logging function immediately following a log_open() call can still easily + * reference an error that happened immediately before the log_open() call. */ PROTECT_ERRNO; - /* If we don't use the console we close it here, to not get - * killed by SAK. If we don't use syslog we close it here so - * that we are not confused by somebody deleting the socket in - * the fs, and to make sure we don't use it if prohibit_ipc is - * set. If we don't use /dev/kmsg we still keep it open, + /* If we don't use the console, we close it here to not get killed by SAK. If we don't use syslog, we + * close it here too, so that we are not confused by somebody deleting the socket in the fs, and to + * make sure we don't use it if prohibit_ipc is set. If we don't use /dev/kmsg we still keep it open, * because there is no reason to close it. */ if (log_target == LOG_TARGET_NULL) { |