From 0b75493da03fed3bf077791ce1289910eb6f6641 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Wed, 15 Feb 2023 10:08:16 +0900 Subject: [PATCH] tree-wide: fix typo and comment style update --- NEWS | 2 +- docs/NETWORK_ONLINE.md | 2 +- src/basic/fileio.c | 2 +- src/basic/missing_magic.h | 2 +- src/basic/os-util.c | 2 +- src/basic/terminal-util.h | 2 +- src/boot/efi/bcd.c | 2 +- src/boot/efi/boot.c | 2 +- src/boot/efi/console.c | 2 +- src/boot/efi/cpio.c | 4 ++-- src/core/device.c | 2 +- src/cryptenroll/cryptenroll-tpm2.c | 2 +- src/dissect/dissect.c | 2 +- src/libsystemd-network/sd-dhcp-server.c | 2 +- src/network/networkd-link.c | 4 ++-- src/oom/oomd-util.h | 2 +- src/oom/test-oomd-util.c | 2 +- src/pstore/pstore.c | 2 +- src/shared/base-filesystem.c | 2 +- src/shared/dissect-image.c | 2 +- src/shared/ethtool-util.h | 2 +- src/shared/json.c | 2 +- src/udev/net/link-config.c | 2 +- src/ukify/ukify.py | 2 +- test/units/testsuite-70.sh | 2 +- 25 files changed, 27 insertions(+), 27 deletions(-) diff --git a/NEWS b/NEWS index f86c89cd778..3f1fc56c07e 100644 --- a/NEWS +++ b/NEWS @@ -848,7 +848,7 @@ CHANGES WITH 252 🎃: (e.g. comparisons for empty strings). Boot counting is now part of the main specification. - * New PCRs measurements are performed during boot: PCR 11 for the the + * New PCRs measurements are performed during boot: PCR 11 for the kernel+initrd combo, PCR 13 for any sysext images. If a measurement took place this is now reported to userspace via the new StubPcrKernelImage and StubPcrInitRDSysExts EFI variables. diff --git a/docs/NETWORK_ONLINE.md b/docs/NETWORK_ONLINE.md index aec27ed5a44..9e7a741bddc 100644 --- a/docs/NETWORK_ONLINE.md +++ b/docs/NETWORK_ONLINE.md @@ -16,7 +16,7 @@ start to be configured. Its primary purpose is for usage with firewall services that want to establish a firewall *before* any network interface is up. `network-pre.target` is a passive unit: it cannot be started directly and it is -not pulled in by the the network management service, but instead a service that +not pulled in by the network management service, but instead a service that wants to run before it must pull it in. Network management services hence should set `After=network-pre.target`, but not `Wants=network-pre.target` or `Requires=network-pre.target`. Services that want to be run before the network diff --git a/src/basic/fileio.c b/src/basic/fileio.c index 51b11ab9c7d..c802db749b3 100644 --- a/src/basic/fileio.c +++ b/src/basic/fileio.c @@ -504,7 +504,7 @@ int read_virtual_file_fd(int fd, size_t max_size, char **ret_contents, size_t *r * at least one more byte to be able to distinguish EOF from truncation. */ if (max_size != SIZE_MAX && n > max_size) { n = size; /* Make sure we never use more than what we sized the buffer for (so that - * we have one free byte in it for the trailing NUL we add below).*/ + * we have one free byte in it for the trailing NUL we add below). */ truncated = true; break; } diff --git a/src/basic/missing_magic.h b/src/basic/missing_magic.h index c104fcfba31..27a33adecb4 100644 --- a/src/basic/missing_magic.h +++ b/src/basic/missing_magic.h @@ -58,7 +58,7 @@ #define UDF_SUPER_MAGIC 0x15013346 #endif -/* b1123ea6d3b3da25af5c8a9d843bd07ab63213f4 (4.8)*/ +/* b1123ea6d3b3da25af5c8a9d843bd07ab63213f4 (4.8) */ #ifndef BALLOON_KVM_MAGIC #define BALLOON_KVM_MAGIC 0x13661366 #endif diff --git a/src/basic/os-util.c b/src/basic/os-util.c index 37a4ac1fe4b..bf844e5b7fe 100644 --- a/src/basic/os-util.c +++ b/src/basic/os-util.c @@ -171,7 +171,7 @@ int open_extension_release(const char *root, const char *extension, bool relax_e /* We already found what we were looking for, but there's another candidate? * We treat this as an error, as we want to enforce that there are no ambiguities - * in case we are in the fallback path.*/ + * in case we are in the fallback path. */ if (r == 0) { r = -ENOTUNIQ; break; diff --git a/src/basic/terminal-util.h b/src/basic/terminal-util.h index 59c868a2a53..1723de34fa2 100644 --- a/src/basic/terminal-util.h +++ b/src/basic/terminal-util.h @@ -111,7 +111,7 @@ typedef enum ColorMode { /* Only 256 colors. */ COLOR_256, - /* For truecolor or 24bit color support.*/ + /* For truecolor or 24bit color support. */ COLOR_24BIT, _COLOR_INVALID = -EINVAL, diff --git a/src/boot/efi/bcd.c b/src/boot/efi/bcd.c index 7200012c0a7..f6291e8b7f4 100644 --- a/src/boot/efi/bcd.c +++ b/src/boot/efi/bcd.c @@ -204,7 +204,7 @@ static const KeyValue *get_key_value(const uint8_t *bcd, uint32_t bcd_len, const /* The BCD store is really just a regular windows registry hive with a rather cryptic internal * key structure. On a running system it gets mounted to HKEY_LOCAL_MACHINE\BCD00000000. * - * Of interest to us are the these two keys: + * Of interest to us are these two keys: * - \Objects\{bootmgr}\Elements\24000001 * This key is the "displayorder" property and contains a value of type REG_MULTI_SZ * with the name "Element" that holds a {GUID} list (UTF16, NUL-separated). diff --git a/src/boot/efi/boot.c b/src/boot/efi/boot.c index 03fe022ef64..6d4da0c51c6 100644 --- a/src/boot/efi/boot.c +++ b/src/boot/efi/boot.c @@ -1907,7 +1907,7 @@ static ConfigEntry *config_entry_add_loader_auto( * but we do not want to do that if that would be us. * * If the default loader is not us, it might be shim. It would - * chainload GRUBX64.EFI in that case, which might be us.*/ + * chainload GRUBX64.EFI in that case, which might be us. */ if (strcaseeq16(loader, loaded_image_path) || is_sd_boot(root_dir, loader) || is_sd_boot(root_dir, u"\\EFI\\BOOT\\GRUB" EFI_MACHINE_TYPE_NAME u".EFI")) diff --git a/src/boot/efi/console.c b/src/boot/efi/console.c index 3b8b6b2e419..343d9656928 100644 --- a/src/boot/efi/console.c +++ b/src/boot/efi/console.c @@ -47,7 +47,7 @@ EFI_STATUS console_key_read(uint64_t *key, uint64_t timeout_usec) { assert(key); if (!checked) { - /* Get the *first* TextInputEx device.*/ + /* Get the *first* TextInputEx device. */ err = BS->LocateProtocol( MAKE_GUID_PTR(EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL), NULL, (void **) &extraInEx); if (err != EFI_SUCCESS || BS->CheckEvent(extraInEx->WaitForKeyEx) == EFI_INVALID_PARAMETER) diff --git a/src/boot/efi/cpio.c b/src/boot/efi/cpio.c index a91070b0207..1fd16a98d16 100644 --- a/src/boot/efi/cpio.c +++ b/src/boot/efi/cpio.c @@ -79,7 +79,7 @@ static EFI_STATUS pack_cpio_one( if (*inode_counter == UINT32_MAX) /* more than 2^32-1 inodes? yikes. cpio doesn't support that either */ return EFI_OUT_OF_RESOURCES; - l = 6 + 13*8 + 1 + 1; /* Fixed CPIO header size, slash separator, and NUL byte after the file name*/ + l = 6 + 13*8 + 1 + 1; /* Fixed CPIO header size, slash separator, and NUL byte after the file name */ target_dir_prefix_size = strlen8(target_dir_prefix); if (l > SIZE_MAX - target_dir_prefix_size) @@ -177,7 +177,7 @@ static EFI_STATUS pack_cpio_dir( if (*inode_counter == UINT32_MAX) return EFI_OUT_OF_RESOURCES; - l = 6 + 13*8 + 1; /* Fixed CPIO header size, and NUL byte after the file name*/ + l = 6 + 13*8 + 1; /* Fixed CPIO header size, and NUL byte after the file name */ path_size = strlen8(path); if (l > SIZE_MAX - path_size) diff --git a/src/core/device.c b/src/core/device.c index ec018a4c442..845fc5dd292 100644 --- a/src/core/device.c +++ b/src/core/device.c @@ -684,7 +684,7 @@ static int device_setup_unit(Manager *m, sd_device *dev, const char *path, bool * serialize the sysfs path across reloads/reexecs. Hence, when coming back from a reload/restart we * might have the state valid, but not the sysfs path. Also, there is another possibility; when multiple * devices have the same devlink (e.g. /dev/disk/by-uuid/xxxx), adding/updating/removing one of the - * device causes syspath change. Hence, let's always update sysfs path.*/ + * device causes syspath change. Hence, let's always update sysfs path. */ /* Let's remove all dependencies generated due to udev properties. We'll re-add whatever is configured * now below. */ diff --git a/src/cryptenroll/cryptenroll-tpm2.c b/src/cryptenroll/cryptenroll-tpm2.c index 1052321fdc8..fc6cc74dadb 100644 --- a/src/cryptenroll/cryptenroll-tpm2.c +++ b/src/cryptenroll/cryptenroll-tpm2.c @@ -229,7 +229,7 @@ int enroll_tpm2(struct crypt_device *cd, return r; /* return existing keyslot, so that wiping won't kill it */ } - /* Quick verification that everything is in order, we are not in a hurry after all.*/ + /* Quick verification that everything is in order, we are not in a hurry after all. */ if (!pubkey || signature_json) { _cleanup_(erase_and_freep) void *secret2 = NULL; size_t secret2_size; diff --git a/src/dissect/dissect.c b/src/dissect/dissect.c index f435932815d..10d977ed85b 100644 --- a/src/dissect/dissect.c +++ b/src/dissect/dissect.c @@ -1258,7 +1258,7 @@ static int action_umount(const char *path) { if (r < 0) return log_error_errno(r, "Failed to unmount '%s': %m", canonical); - /* We managed to lock and unmount successfully? That means we can try to remove the loop device.*/ + /* We managed to lock and unmount successfully? That means we can try to remove the loop device. */ loop_device_unrelinquish(d); if (arg_rmdir) { diff --git a/src/libsystemd-network/sd-dhcp-server.c b/src/libsystemd-network/sd-dhcp-server.c index 7d84aaf6ab9..5de230aaed7 100644 --- a/src/libsystemd-network/sd-dhcp-server.c +++ b/src/libsystemd-network/sd-dhcp-server.c @@ -1533,7 +1533,7 @@ int sd_dhcp_server_set_router(sd_dhcp_server *server, const struct in_addr *rout /* router is NULL: router option will not be appended. * router is null address (0.0.0.0): the server address will be used as the router address. - * otherwise: the specified address will be used as the router address.*/ + * otherwise: the specified address will be used as the router address. */ server->emit_router = router; if (router) diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c index e43c04567a4..019bef0590a 100644 --- a/src/network/networkd-link.c +++ b/src/network/networkd-link.c @@ -2711,7 +2711,7 @@ int link_flags_to_string_alloc(uint32_t flags, char **ret) { _cleanup_free_ char *str = NULL; static const char* map[] = { [LOG2U(IFF_UP)] = "up", /* interface is up. */ - [LOG2U(IFF_BROADCAST)] = "broadcast", /* broadcast address valid.*/ + [LOG2U(IFF_BROADCAST)] = "broadcast", /* broadcast address valid. */ [LOG2U(IFF_DEBUG)] = "debug", /* turn on debugging. */ [LOG2U(IFF_LOOPBACK)] = "loopback", /* interface is a loopback net. */ [LOG2U(IFF_POINTOPOINT)] = "point-to-point", /* interface has p-p link. */ @@ -2722,7 +2722,7 @@ int link_flags_to_string_alloc(uint32_t flags, char **ret) { [LOG2U(IFF_ALLMULTI)] = "all-multicast", /* receive all multicast packets. */ [LOG2U(IFF_MASTER)] = "master", /* master of a load balancer. */ [LOG2U(IFF_SLAVE)] = "slave", /* slave of a load balancer. */ - [LOG2U(IFF_MULTICAST)] = "multicast", /* supports multicast.*/ + [LOG2U(IFF_MULTICAST)] = "multicast", /* supports multicast. */ [LOG2U(IFF_PORTSEL)] = "portsel", /* can set media type. */ [LOG2U(IFF_AUTOMEDIA)] = "auto-media", /* auto media select active. */ [LOG2U(IFF_DYNAMIC)] = "dynamic", /* dialup device with changing addresses. */ diff --git a/src/oom/oomd-util.h b/src/oom/oomd-util.h index a758d5589bf..f53e4c47e8b 100644 --- a/src/oom/oomd-util.h +++ b/src/oom/oomd-util.h @@ -109,7 +109,7 @@ static inline int compare_swap_usage(OomdCGroupContext * const *c1, OomdCGroupCo * Returns the number of sorted items; negative on error. */ int oomd_sort_cgroup_contexts(Hashmap *h, oomd_compare_t compare_func, const char *prefix, OomdCGroupContext ***ret); -/* If the the cgroup is owned by root, or the cgroups represented by `ctx` and +/* If the cgroup is owned by root, or the cgroups represented by `ctx` and * `prefix` are owned by the same user, then set `ctx->preference` using the * `user.oomd_avoid` and `user.oomd_omit` xattrs. Otherwise, set * `ctx->preference` to MANAGED_OOM_PREFERENCE_NONE. diff --git a/src/oom/test-oomd-util.c b/src/oom/test-oomd-util.c index ed988123991..ef99d924bb1 100644 --- a/src/oom/test-oomd-util.c +++ b/src/oom/test-oomd-util.c @@ -474,7 +474,7 @@ static void test_oomd_fetch_cgroup_oom_preference(void) { assert_se(oomd_fetch_cgroup_oom_preference(ctx, "/herp.slice/derp.scope") == -EINVAL); /* Assert that avoid/omit are not set if the cgroup and prefix are not - * owned by the same user.*/ + * owned by the same user. */ if (test_xattrs && !empty_or_root(cgroup)) { ctx = oomd_cgroup_context_free(ctx); assert_se(cg_set_access(SYSTEMD_CGROUP_CONTROLLER, cgroup, 61183, 0) >= 0); diff --git a/src/pstore/pstore.c b/src/pstore/pstore.c index 306540650fd..7408ed044d1 100644 --- a/src/pstore/pstore.c +++ b/src/pstore/pstore.c @@ -214,7 +214,7 @@ static int process_dmesg_files(PStoreList *list) { * The dmesg- filename contains the backend-type and the Common Platform Error Record, CPER, * record id, a 64-bit number. * - * Files are processed in reverse lexigraphical order so as to properly reconstruct original dmesg.*/ + * Files are processed in reverse lexigraphical order so as to properly reconstruct original dmesg. */ for (size_t n = list->n_entries; n > 0; n--) { PStoreEntry *pe; diff --git a/src/shared/base-filesystem.c b/src/shared/base-filesystem.c index c3f6c1f9f49..be6dd1654a0 100644 --- a/src/shared/base-filesystem.c +++ b/src/shared/base-filesystem.c @@ -45,7 +45,7 @@ static const BaseFilesystem table[] = { * been mounted into) it is thus necessary to create a symlink pointing to the right subdirectory of * /usr/ first — otherwise we couldn't invoke any dynamic binary. Let's detect this case here, and * create the symlink as needed should it be missing. We prefer doing this consistently with Debian's - * multiarch logic, but support Fedora-style multilib too.*/ + * multiarch logic, but support Fedora-style multilib too. */ #if defined(__aarch64__) /* aarch64 ELF ABI actually says dynamic loader is in /lib/, but Fedora puts it in /lib64/ anyway and * just symlinks /lib/ld-linux-aarch64.so.1 to ../lib64/ld-linux-aarch64.so.1. For this to work diff --git a/src/shared/dissect-image.c b/src/shared/dissect-image.c index a71f11794cf..210e2c7cf7d 100644 --- a/src/shared/dissect-image.c +++ b/src/shared/dissect-image.c @@ -3332,7 +3332,7 @@ int mount_image_privately_interactively( assert(ret_directory); assert(ret_loop_device); - /* We intend to mount this right-away, hence add the partitions if needed and pin them*/ + /* We intend to mount this right-away, hence add the partitions if needed and pin them. */ flags |= DISSECT_IMAGE_ADD_PARTITION_DEVICES | DISSECT_IMAGE_PIN_PARTITION_DEVICES; diff --git a/src/shared/ethtool-util.h b/src/shared/ethtool-util.h index d07cfaefb26..84dd444d338 100644 --- a/src/shared/ethtool-util.h +++ b/src/shared/ethtool-util.h @@ -117,7 +117,7 @@ struct ethtool_link_usettings { }; typedef struct u32_opt { - uint32_t value; /* a value of 0 indicates the hardware advertised maximum should be used.*/ + uint32_t value; /* a value of 0 indicates the hardware advertised maximum should be used. */ bool set; } u32_opt; diff --git a/src/shared/json.c b/src/shared/json.c index c2700481971..8962173b3ae 100644 --- a/src/shared/json.c +++ b/src/shared/json.c @@ -4318,7 +4318,7 @@ int json_log_internal( static void *dispatch_userdata(const JsonDispatch *p, void *userdata) { - /* When the the userdata pointer is passed in as NULL, then we'll just use the offset as a literal + /* When the userdata pointer is passed in as NULL, then we'll just use the offset as a literal * address, and convert it to a pointer. Note that might as well just add the offset to the NULL * pointer, but UndefinedBehaviourSanitizer doesn't like pointer arithmetics based on NULL pointers, * hence we code this explicitly here. */ diff --git a/src/udev/net/link-config.c b/src/udev/net/link-config.c index 9efdb6000ac..0bea6f1c168 100644 --- a/src/udev/net/link-config.c +++ b/src/udev/net/link-config.c @@ -548,7 +548,7 @@ static bool hw_addr_is_valid(Link *link, const struct hw_addr_data *hw_addr) { return !ether_addr_is_null(&hw_addr->ether) && !ether_addr_is_broadcast(&hw_addr->ether); case ARPHRD_INFINIBAND: - /* The last 8 bytes cannot be zero*/ + /* The last 8 bytes cannot be zero. */ assert(hw_addr->length == INFINIBAND_ALEN); return !memeqzero(hw_addr->bytes + INFINIBAND_ALEN - 8, 8); diff --git a/src/ukify/ukify.py b/src/ukify/ukify.py index 2c7c46b42b8..4dae2efc48c 100755 --- a/src/ukify/ukify.py +++ b/src/ukify/ukify.py @@ -652,7 +652,7 @@ usage: ukify [options…] linux initrd… p.add_argument('--stub', type=pathlib.Path, - help='path the the sd-stub file [.text,.data,… sections]') + help='path to the sd-stub file [.text,.data,… sections]') p.add_argument('--section', dest='sections', diff --git a/test/units/testsuite-70.sh b/test/units/testsuite-70.sh index 54e30642a5a..3499d6160f2 100755 --- a/test/units/testsuite-70.sh +++ b/test/units/testsuite-70.sh @@ -140,7 +140,7 @@ if [ -e /usr/lib/systemd/systemd-measure ] && \ SYSTEMD_CRYPTSETUP_USE_TOKEN_MODULE=0 /usr/lib/systemd/systemd-cryptsetup attach test-volume2 $img - tpm2-device=auto,tpm2-signature="/tmp/pcrsign.sig2",headless=1 SYSTEMD_CRYPTSETUP_USE_TOKEN_MODULE=0 /usr/lib/systemd/systemd-cryptsetup detach test-volume2 - # Check if we can activate that (and a second time with the the token module stuff enabled) + # Check if we can activate that (and a second time with the token module stuff enabled) SYSTEMD_CRYPTSETUP_USE_TOKEN_MODULE=1 /usr/lib/systemd/systemd-cryptsetup attach test-volume2 $img - tpm2-device=auto,tpm2-signature="/tmp/pcrsign.sig2",headless=1 SYSTEMD_CRYPTSETUP_USE_TOKEN_MODULE=1 /usr/lib/systemd/systemd-cryptsetup detach test-volume2