diff --git a/NEWS b/NEWS
index e2e6ebe528..99194b02d0 100644
--- a/NEWS
+++ b/NEWS
@@ -90,7 +90,7 @@ CHANGES WITH 247 in spe:
latter it takes precedence over the former, similar to how most of
systemd's own configuration is handled. Given that PAM stack
definitions are primarily put together by OS vendors/distributions
- (though possibly overriden by users), this systemd release moves its
+ (though possibly overridden by users), this systemd release moves its
own PAM stack configuration for the "systemd-user" PAM service (i.e.
for the PAM session invoked by the per-user user@.service instance)
from /etc/pam.d/ to /usr/lib/pam.d/. We recommend moving all
@@ -98,7 +98,7 @@ CHANGES WITH 247 in spe:
/etc/pam.d/ to /usr/lib/pam.d/, but if such OS-wide migration is not
desired the location to which systemd installs its PAM stack
configuration file may be changed via the "pamconfdir" meson variable
- at build time, optionally undoing ths change of default paths
+ at build time, optionally undoing this change of default paths
introduced with systemd 247.
CHANGES WITH 246:
@@ -260,7 +260,7 @@ CHANGES WITH 246:
generation for collection with systemd-pstore.
* We provide a set of udev rules to enable auto-suspend on PCI and USB
- devices that were tested to currectly support it. Previously, this
+ devices that were tested to correctly support it. Previously, this
was distributed as a set of udev rules, but has now been replaced by
by a set of hwdb entries (and a much shorter udev rule to take action
if the device modalias matches one of the new hwdb entries).
diff --git a/man/networkctl.xml b/man/networkctl.xml
index 1a4553afd9..9b50912765 100644
--- a/man/networkctl.xml
+++ b/man/networkctl.xml
@@ -301,7 +301,7 @@ s - Service VLAN, m - Two-port MAC Relay (TPMR)
Reconfigure network interfaces. Takes interface name or index number. Note that
this does not reload .netdev or .network
- corresponding to the the specifed interface. So, if you edit config files, it is necessary to
+ corresponding to the the specified interface. So, if you edit config files, it is necessary to
call networkctl reload first to apply new settings.
diff --git a/man/systemd-repart.xml b/man/systemd-repart.xml
index fb0d4c3496..b234cfe949 100644
--- a/man/systemd-repart.xml
+++ b/man/systemd-repart.xml
@@ -213,7 +213,7 @@
specifies the initial size of the loopback file to create.
The option takes the sizes of pre-existing partitions into
- account. However, it does not accomodate for partition tables that are not tightly packed: the
+ account. However, it does not accommodate for partition tables that are not tightly packed: the
configured partitions might still not fit into the backing device if empty space exists between
pre-existing partitions (or before the first partition) that cannot be fully filled by partitions to
grow or create.
diff --git a/man/systemd.socket.xml b/man/systemd.socket.xml
index 3aff453185..733977b88d 100644
--- a/man/systemd.socket.xml
+++ b/man/systemd.socket.xml
@@ -200,13 +200,13 @@
If the address string is a string in the format
- v.w.x.y:z, it is interpeted
+ v.w.x.y:z, it is interpreted
as IPv4 address v.w.x.y and port z.If the address string is a string in the format
[x]:y, it is interpreted as
IPv6 address x and port y. An optional
- interface scope (interface name or number) may be specifed after a % symbol:
+ interface scope (interface name or number) may be specified after a % symbol:
[x]:y%dev.
Interface scopes are only useful with link-local addresses, because the kernel ignores them in other
cases. Note that if an address is specified as IPv6, it might still make the service available via
diff --git a/man/tc.xml b/man/tc.xml
index f312ac2692..da24c081ee 100644
--- a/man/tc.xml
+++ b/man/tc.xml
@@ -39,7 +39,7 @@
ClassId=
- Configues the unique identifier of the class. It is specified as the major and minor numbers in
+ Configures the unique identifier of the class. It is specified as the major and minor numbers in
hexadecimal in the range 0x1–Oxffff separated with a colon (major:minor).
Defaults to unset.
diff --git a/src/basic/copy.c b/src/basic/copy.c
index 6c1d045ea9..773f7b8067 100644
--- a/src/basic/copy.c
+++ b/src/basic/copy.c
@@ -432,7 +432,7 @@ static int hardlink_context_setup(
* bottleneck we can certainly place an in-memory hash table in front of this, but for the beginning,
* let's keep things simple, and just use the disk as lookup table for inodes.
*
- * Note that this should have zero performace impact as long as .n_link of all files copied remains
+ * Note that this should have zero performance impact as long as .n_link of all files copied remains
* <= 0, because in that case we will not actually allocate the hardlink inode lookup table directory
* on disk (we do so lazily, when the first candidate with .n_link > 1 is seen). This means, in the
* common case where hardlinks are not used at all or only for few files the fact that we store the
diff --git a/src/basic/io-util.c b/src/basic/io-util.c
index 18baadb1fe..460649deda 100644
--- a/src/basic/io-util.c
+++ b/src/basic/io-util.c
@@ -153,10 +153,8 @@ int pipe_eof(int fd) {
int r;
r = fd_wait_for_event(fd, POLLIN, 0);
- if (r < 0)
+ if (r <= 0)
return r;
- if (r == 0)
- return 0;
return !!(r & POLLHUP);
}
diff --git a/src/core/execute.c b/src/core/execute.c
index 694033e82c..50294a506f 100644
--- a/src/core/execute.c
+++ b/src/core/execute.c
@@ -2484,7 +2484,7 @@ static int acquire_credentials(
if (dfd < 0)
return -errno;
- /* First we use the literally specified credentials. Note that they might be overriden again below,
+ /* First we use the literally specified credentials. Note that they might be overridden again below,
* and thus act as a "default" if the same credential is specified multiple times */
HASHMAP_FOREACH(sc, context->set_credentials) {
size_t add;
@@ -2804,7 +2804,7 @@ static int setup_credentials(
* Yes it's nasty playing games with /dev/ and /dev/shm/ like this, since it does not exist
* for this purpose, but there are few other candidates that work equally well for us, and
* given that the we do this in a privately namespaced short-lived single-threaded process
- * that noone else sees this should be OK to do.*/
+ * that no one else sees this should be OK to do.*/
if (mount(NULL, "/dev", NULL, MS_SLAVE|MS_REC, NULL) < 0) /* Turn off propagation from our namespace to host */
goto child_fail;
@@ -4340,7 +4340,7 @@ static int exec_child(
* we'll try not to call PR_SET_SECUREBITS unless necessary. Setting securebits requires
* CAP_SETPCAP. */
if (prctl(PR_GET_SECUREBITS) != secure_bits) {
- /* CAP_SETPCAP is required to set securebits. This capabilitiy is raised into the
+ /* CAP_SETPCAP is required to set securebits. This capability is raised into the
* effective set here.
* The effective set is overwritten during execve with the following values:
* - ambient set (for non-root processes)
diff --git a/src/core/mount-setup.c b/src/core/mount-setup.c
index cc43bcdc7b..7c177839b3 100644
--- a/src/core/mount-setup.c
+++ b/src/core/mount-setup.c
@@ -542,7 +542,7 @@ int mount_setup(bool loaded_policy, bool leave_propagation) {
/* Also create /run/systemd/inaccessible nodes, so that we always have something to mount
* inaccessible nodes from. If we run in a container the host might have created these for us already
- * in /run/host/inaccessible/. Use those if we can, since tht way we likely get access to block/char
+ * in /run/host/inaccessible/. Use those if we can, since that way we likely get access to block/char
* device nodes that are inaccessible, and if userns is used to nodes that are on mounts owned by a
* userns outside the container and thus nicely read-only and not remountable. */
if (access("/run/host/inaccessible/", F_OK) < 0) {
diff --git a/src/core/unit.c b/src/core/unit.c
index 96a21b95b3..c3d7d24ecc 100644
--- a/src/core/unit.c
+++ b/src/core/unit.c
@@ -209,11 +209,7 @@ static int unit_add_alias(Unit *u, char *donated_name) {
/* Make sure that u->names is allocated. We may leave u->names
* empty if we fail later, but this is not a problem. */
- r = set_ensure_allocated(&u->aliases, &string_hash_ops);
- if (r < 0)
- return r;
-
- r = set_put(u->aliases, donated_name);
+ r = set_ensure_put(&u->aliases, &string_hash_ops, donated_name);
if (r < 0)
return r;
assert(r > 0);
diff --git a/src/home/homectl-fido2.c b/src/home/homectl-fido2.c
index b7b2c1a3b5..0d087c79f0 100644
--- a/src/home/homectl-fido2.c
+++ b/src/home/homectl-fido2.c
@@ -534,6 +534,7 @@ finish:
fido_dev_info_free(&di, di_size);
return r;
#else
- return log_error_errno(EOPNOTSUPP, "FIDO2 tokens not supported on this build.");
+ return log_error_errno(SYNTHETIC_ERRNO(EOPNOTSUPP),
+ "FIDO2 tokens not supported on this build.");
#endif
}
diff --git a/src/home/homectl-pkcs11.c b/src/home/homectl-pkcs11.c
index f4253ed7bf..3507841faa 100644
--- a/src/home/homectl-pkcs11.c
+++ b/src/home/homectl-pkcs11.c
@@ -475,6 +475,7 @@ int find_pkcs11_token_auto(char **ret) {
return 0;
#else
- return log_error_errno(EOPNOTSUPP, "PKCS#11 tokens not supported on this build.");
+ return log_error_errno(SYNTHETIC_ERRNO(EOPNOTSUPP),
+ "PKCS#11 tokens not supported on this build.");
#endif
}
diff --git a/src/home/homework-luks.c b/src/home/homework-luks.c
index b263d75827..b9e696f0ac 100644
--- a/src/home/homework-luks.c
+++ b/src/home/homework-luks.c
@@ -2183,7 +2183,7 @@ int home_create_luks(
if (disk_uuid_path)
(void) ioctl(image_fd, BLKRRPART, 0);
else {
- /* If we operate on a file, sync the contaning directory too. */
+ /* If we operate on a file, sync the containing directory too. */
r = fsync_directory_of_file(image_fd);
if (r < 0) {
log_error_errno(r, "Failed to synchronize directory of image file to disk: %m");
diff --git a/src/libsystemd/sd-netlink/sd-netlink.c b/src/libsystemd/sd-netlink/sd-netlink.c
index 91670ee324..ff0886d40b 100644
--- a/src/libsystemd/sd-netlink/sd-netlink.c
+++ b/src/libsystemd/sd-netlink/sd-netlink.c
@@ -495,10 +495,8 @@ static int rtnl_poll(sd_netlink *rtnl, bool need_more, uint64_t timeout_usec) {
m = timeout_usec;
r = fd_wait_for_event(rtnl->fd, e, m);
- if (r < 0)
+ if (r <= 0)
return r;
- if (r == 0)
- return 0;
return 1;
}
diff --git a/src/network/networkd-dhcp4.c b/src/network/networkd-dhcp4.c
index 167b86d0ba..eddeb0d5ef 100644
--- a/src/network/networkd-dhcp4.c
+++ b/src/network/networkd-dhcp4.c
@@ -704,7 +704,7 @@ static int dhcp4_address_ready_callback(Address *address) {
r = dhcp4_start_acd(link);
if (r < 0)
- return log_link_error_errno(link, r, "Failed to start IPv4ACD for DHCP4 adddress: %m");
+ return log_link_error_errno(link, r, "Failed to start IPv4ACD for DHCP4 address: %m");
dhcp4_check_ready(link);
return 0;
diff --git a/src/partition/repart.c b/src/partition/repart.c
index a7803c878c..28c9de7b2b 100644
--- a/src/partition/repart.c
+++ b/src/partition/repart.c
@@ -66,7 +66,7 @@
/* Hard lower limit for new partition sizes */
#define HARD_MIN_SIZE 4096
-/* libfdisk takes off sightly more than 1M of the disk size when creating a GPT disk label */
+/* libfdisk takes off slightly more than 1M of the disk size when creating a GPT disk label */
#define GPT_METADATA_SIZE (1044*1024)
/* LUKS2 takes off 16M of the partition size with its metadata by default */
diff --git a/src/resolve/resolved-dns-stub.c b/src/resolve/resolved-dns-stub.c
index 1d23a199e9..5c6da94b33 100644
--- a/src/resolve/resolved-dns-stub.c
+++ b/src/resolve/resolved-dns-stub.c
@@ -648,7 +648,7 @@ static int manager_dns_stub_fd_extra(Manager *m, DnsStubListenerExtra *l, int ty
if (r < 0)
goto fail;
- /* Do not set IP_TTL for extra DNS stub listners, as the address may not be local and in that case
+ /* Do not set IP_TTL for extra DNS stub listeners, as the address may not be local and in that case
* people may want ttl > 1. */
r = socket_set_freebind(fd, l->family, true);
diff --git a/src/shared/offline-passwd.c b/src/shared/offline-passwd.c
index 26a1b9c537..2d14a38dfe 100644
--- a/src/shared/offline-passwd.c
+++ b/src/shared/offline-passwd.c
@@ -36,7 +36,7 @@ static int populate_uid_cache(const char *root, Hashmap **ret) {
if (!cache)
return -ENOMEM;
- /* The directory list is harcoded here: /etc is the standard, and rpm-ostree uses /usr/lib. This
+ /* The directory list is hardcoded here: /etc is the standard, and rpm-ostree uses /usr/lib. This
* could be made configurable, but I don't see the point right now. */
const char *fname;
diff --git a/src/shared/user-record.h b/src/shared/user-record.h
index bbcb2201e8..357c246ea5 100644
--- a/src/shared/user-record.h
+++ b/src/shared/user-record.h
@@ -210,7 +210,7 @@ typedef struct RecoveryKey {
/* The type of recovery key, must be "modhex64" right now */
char *type;
- /* A UNIX pasword hash of the normalized form of modhex64 */
+ /* A UNIX password hash of the normalized form of modhex64 */
char *hashed_password;
} RecoveryKey;
diff --git a/src/shared/varlink.c b/src/shared/varlink.c
index aeec424754..86b5f08ae7 100644
--- a/src/shared/varlink.c
+++ b/src/shared/varlink.c
@@ -1045,10 +1045,8 @@ int varlink_wait(Varlink *v, usec_t timeout) {
return events;
r = fd_wait_for_event(fd, events, t);
- if (r < 0)
+ if (r <= 0)
return r;
- if (r == 0)
- return 0;
handle_revents(v, r);
return 1;
diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c
index 47da74c299..b9b37008b1 100644
--- a/src/tmpfiles/tmpfiles.c
+++ b/src/tmpfiles/tmpfiles.c
@@ -528,7 +528,7 @@ static int dir_cleanup(
continue;
/* If statx() is supported, use it. It's preferable over fstatat() since it tells us
- * explicitly where we are looking at a mount point, for free as side information. Determing
+ * explicitly where we are looking at a mount point, for free as side information. Determining
* the same information without statx() is hard, see the complexity of path_is_mount_point(),
* and also much slower as it requires a number of syscalls instead of just one. Hence, when
* we have modern statx() we use it instead of fstat() and do proper mount point checks,