]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
tree-wide: fix typo and comment style update
authorYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 15 Feb 2023 01:08:16 +0000 (10:08 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 15 Feb 2023 01:08:16 +0000 (10:08 +0900)
25 files changed:
NEWS
docs/NETWORK_ONLINE.md
src/basic/fileio.c
src/basic/missing_magic.h
src/basic/os-util.c
src/basic/terminal-util.h
src/boot/efi/bcd.c
src/boot/efi/boot.c
src/boot/efi/console.c
src/boot/efi/cpio.c
src/core/device.c
src/cryptenroll/cryptenroll-tpm2.c
src/dissect/dissect.c
src/libsystemd-network/sd-dhcp-server.c
src/network/networkd-link.c
src/oom/oomd-util.h
src/oom/test-oomd-util.c
src/pstore/pstore.c
src/shared/base-filesystem.c
src/shared/dissect-image.c
src/shared/ethtool-util.h
src/shared/json.c
src/udev/net/link-config.c
src/ukify/ukify.py
test/units/testsuite-70.sh

diff --git a/NEWS b/NEWS
index f86c89cd7787bce5da9c01c6168bec9ba2311481..3f1fc56c07e8e8084a1fcf3cb2a135e5fbd87ded 100644 (file)
--- 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.
index aec27ed5a4431d3349f6b1ef9c3575cee279dfe6..9e7a741bddc5938815eccbffab8ee98a2c0a7321 100644 (file)
@@ -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
index 51b11ab9c7d12e85dc76500c3216e82deb9cc43b..c802db749b369744b45cd09526c73140d690ce5b 100644 (file)
@@ -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;
                 }
index c104fcfba3151a528f05514b091100c9c0a3f4bc..27a33adecb4edd3691e7ac07eff560235902351a 100644 (file)
@@ -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
index 37a4ac1fe4bddda2b23c2a2d0ee0cf04bad7eff4..bf844e5b7fe05776d61b2706ea67e5f4b7ea1640 100644 (file)
@@ -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;
index 59c868a2a53913739e0d875dce16b138efce1f56..1723de34fa2278973dc1027dbff51e09e6510d44 100644 (file)
@@ -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,
index 7200012c0a722d84fa53970280913b3d28d1a6a2..f6291e8b7f4fe5c7b7b36cf65b214a0732720e57 100644 (file)
@@ -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).
index 03fe022ef64510da9dc6c33f60d2c285ae082c98..6d4da0c51c624e910165a38c529d93774b585c74 100644 (file)
@@ -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"))
index 3b8b6b2e4198e0b0ecc440ee28581c8242575bbb..343d96569289a3b9e9519f77ae86fd16df051d7f 100644 (file)
@@ -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)
index a91070b020745c8f7bab3c9bd398677fc497437a..1fd16a98d16412a705feda51432139acdfd0370e 100644 (file)
@@ -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)
index ec018a4c442861d147d3dee4c0fe0a7eb9a2cd4f..845fc5dd29221e4bbd83a29bdd54794ea15d665d 100644 (file)
@@ -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. */
index 1052321fdc8721158189257f0354d0b4205d08b7..fc6cc74dadbd79dfaf8dabf9143fd19d06801c3b 100644 (file)
@@ -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;
index f435932815d10f98f06695db1550f1f2826fd109..10d977ed85b9a8dc3e41e7ee762918b7d2fc89ae 100644 (file)
@@ -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) {
index 7d84aaf6ab9ba2d62cb7d6ccbf1c7b6b60f487eb..5de230aaed783d2808fc43fab59c2318a353f251 100644 (file)
@@ -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)
index e43c04567a4a390ee27e57164ebb4cfa7ffdf446..019bef0590af86ca71f49f75676faab1553b183a 100644 (file)
@@ -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. */
index a758d5589bf6f4ee8022f0f832fabcafe2186659..f53e4c47e8b33860857046f401897f3181a1bc8e 100644 (file)
@@ -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.
index ed98812399132306b0de5f255ca0e52ce079715b..ef99d924bb12bb71d62b218d294482cfd2eed8a5 100644 (file)
@@ -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);
index 306540650fd6fa10c62ab2003678071241231160..7408ed044d10c782784333bc8b72ce263ced5693 100644 (file)
@@ -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;
index c3f6c1f9f49950345a41427dc88b356057f6f1a0..be6dd1654a0d6ed6ec23f6dd80d29cf024f14002 100644 (file)
@@ -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
index a71f11794cf3363da087d01fee4e54806a595bc9..210e2c7cf7d0f0d546dee11c08f9c591db878e22 100644 (file)
@@ -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;
 
index d07cfaefb26b919a2685e39ccbe421ac6f6a23a6..84dd444d33864124e3f57fe52315c32c9d0abe48 100644 (file)
@@ -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;
 
index c2700481971fff556312538de2ef6e670c6382c0..8962173b3aefae94bc5d24e51b7a589df2c0e2fd 100644 (file)
@@ -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. */
index 9efdb6000accc6383834f4eab2052f34a9d719df..0bea6f1c1686c575232b6328c5d55ff0b6ab6ebc 100644 (file)
@@ -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);
 
index 2c7c46b42b89443cd72fd6c6abd02d1703b59721..4dae2efc48c6e85cdc86167bf00f2d68803efd96 100755 (executable)
@@ -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',
index 54e30642a5a091900da4fcb441c22ed42bc82c92..3499d6160f2c73713a508971ca04e2ae940be2c1 100755 (executable)
@@ -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