From da890466433279d2a6714e3571fc8d7dc4369e4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Sat, 1 Jul 2023 15:33:20 -0600 Subject: [PATCH] =?UTF-8?q?tree-wide:=20"bit"=20=E2=86=92=20"-bit"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In some places, " bits" is used when more appropriate. --- NEWS | 24 +++++------ docs/BOOT_LOADER_INTERFACE.md | 2 +- docs/BUILDING_IMAGES.md | 2 +- docs/CODING_STYLE.md | 2 +- docs/ELF_PACKAGE_METADATA.md | 2 +- docs/GROUP_RECORD.md | 2 +- docs/JOURNAL_EXPORT_FORMATS.md | 2 +- docs/JOURNAL_FILE_FORMAT.md | 12 +++--- docs/JOURNAL_NATIVE_PROTOCOL.md | 2 +- docs/UIDS-GIDS.md | 42 +++++++++--------- docs/USER_RECORD.md | 54 ++++++++++++------------ man/coredump.conf.xml | 2 +- man/repart.d.xml | 12 +++--- man/sd-event.xml | 2 +- man/sd_bus_get_n_queued_read.xml | 2 +- man/sd_bus_message_read_basic.xml | 14 +++--- man/sd_event_source_set_priority.xml | 4 +- man/sd_event_wait.xml | 2 +- man/sd_id128_to_string.xml | 2 +- man/sd_journal_get_seqnum.xml | 4 +- man/systemctl.xml | 2 +- man/systemd-veritysetup-generator.xml | 4 +- man/systemd.exec.xml | 6 +-- man/systemd.journal-fields.xml | 2 +- man/systemd.socket.xml | 2 +- src/basic/dirent-util.h | 2 +- src/basic/escape.c | 4 +- src/basic/hash-funcs.h | 6 +-- src/basic/hashmap.c | 6 +-- src/basic/limits-util.c | 4 +- src/basic/rlimit-util.c | 2 +- src/basic/socket-util.c | 2 +- src/basic/socket-util.h | 6 +-- src/basic/time-util.c | 8 ++-- src/basic/time-util.h | 2 +- src/basic/user-util.c | 6 +-- src/basic/user-util.h | 8 ++-- src/basic/utf8.h | 2 +- src/boot/bootctl-util.c | 4 +- src/boot/efi/cpio.c | 2 +- src/boot/efi/efi-string.c | 2 +- src/boot/efi/linux_x86.c | 10 ++--- src/boot/efi/pe.c | 2 +- src/boot/efi/ticks.c | 2 +- src/boot/efi/util.h | 8 ++-- src/busctl/busctl.c | 14 +++--- src/core/bpf-firewall.c | 2 +- src/core/dbus-service.c | 4 +- src/core/manager.c | 4 +- src/coredump/coredump.c | 2 +- src/dissect/dissect.c | 2 +- src/home/homework-fscrypt.c | 4 +- src/home/homework-mount.c | 2 +- src/id128/id128.c | 2 +- src/libsystemd-network/ndisc-router.c | 4 +- src/libsystemd/sd-bus/bus-creds.c | 4 +- src/libsystemd/sd-bus/bus-message.c | 14 +++--- src/libsystemd/sd-bus/bus-socket.c | 2 +- src/libsystemd/sd-bus/sd-bus.c | 2 +- src/libsystemd/sd-id128/id128-util.c | 4 +- src/libsystemd/sd-journal/journal-file.c | 6 +-- src/libsystemd/sd-journal/journal-send.c | 2 +- src/libsystemd/sd-journal/sd-journal.c | 2 +- src/nspawn/nspawn-network.c | 4 +- src/nspawn/nspawn-patch-uid.c | 6 +-- src/nspawn/nspawn.c | 2 +- src/partition/repart.c | 6 +-- src/resolve/resolved-dns-packet.h | 2 +- src/shared/bus-get-properties.h | 4 +- src/shared/conf-parser.c | 4 +- src/shared/dissect-image.c | 4 +- src/shared/dns-domain.c | 15 +++---- src/shared/json-internal.h | 2 +- src/shared/json.h | 2 +- src/shared/linux/bpf.h | 2 +- src/shared/linux/ethtool.h | 2 +- src/shared/quota-util.h | 4 +- src/shared/varlink.h | 2 +- src/systemd/_sd-common.h | 2 +- src/sysupdate/sysupdate-partition.c | 2 +- src/test/test-capability.c | 6 +-- src/test/test-devnum-util.c | 2 +- src/timesync/timesyncd-manager.c | 2 +- 83 files changed, 221 insertions(+), 224 deletions(-) diff --git a/NEWS b/NEWS index 86150a8a455..3e673557daa 100644 --- a/NEWS +++ b/NEWS @@ -1173,7 +1173,7 @@ CHANGES WITH 253: sd_bus_emit_signal_tov(), and sd_bus_message_new_signal_to(). * sd-id128 functions now return -EUCLEAN (instead of -EIO) when the - 128bit ID in files such as /etc/machine-id has an invalid + 128-bit ID in files such as /etc/machine-id has an invalid format. They also accept NULL as output parameter in more places, which is useful when the caller only wants to validate the inputs and does not need the output value. @@ -1568,7 +1568,7 @@ CHANGES WITH 252 🎃: * libsystemd now exports sd_bus_error_setfv() (a convenience function for setting bus errors), sd_id128_string_equal (a convenience - function for 128bit ID string comparisons), and + function for 128-bit ID string comparisons), and sd_bus_message_read_strv_extend() (a function to incrementally read string arrays). @@ -2030,7 +2030,7 @@ CHANGES WITH 251: of activated home directories it manages (if the kernel and selected file systems support it). So far it mapped three UID ranges: the range from 0…60000, the user's own UID, and the range 60514…65534, - leaving everything else unmapped (in other words, the 16bit UID range + leaving everything else unmapped (in other words, the 16-bit UID range is mapped almost fully, with the exception of the UID subrange used for systemd-homed users, with one exception: the user's own UID). Unmapped UIDs may not be used for file ownership in the home @@ -5894,7 +5894,7 @@ CHANGES WITH 245: systemd-timedated. * The systemd-id128 tool gained a new "show" verb for listing or - resolving a number of well-known UUIDs/128bit IDs, currently mostly + resolving a number of well-known UUIDs/128-bit IDs, currently mostly GPT partition table types. * The Discoverable Partitions Specification has been updated to support @@ -6174,7 +6174,7 @@ CHANGES WITH 244: path as the system manager. * The systemd-id128 tool gained a new switch "-u" (or "--uuid") for - outputting the 128bit IDs in UUID format (i.e. in the "canonical + outputting the 128-bit IDs in UUID format (i.e. in the "canonical representation"). * Service units gained a new sandboxing option ProtectKernelLogs= which @@ -6242,7 +6242,7 @@ CHANGES WITH 243: * On 64 bit systems, the "kernel.pid_max" sysctl is now bumped to 4194304 by default, i.e. the full 22bit range the kernel allows, up - from the old 16bit range. This should improve security and + from the old 16-bit range. This should improve security and robustness, as PID collisions are made less likely (though certainly still possible). There are rumours this might create compatibility problems, though at this moment no practical ones are known to @@ -6557,7 +6557,7 @@ CHANGES WITH 243: with gcc's cleanup extension. * The sd-id128.h public API gained a new definition - SD_ID128_UUID_FORMAT_STR for formatting a 128bit ID in UUID format + SD_ID128_UUID_FORMAT_STR for formatting a 128-bit ID in UUID format with printf(). * "busctl introspect" gained a new switch --xml-interface for dumping @@ -7337,7 +7337,7 @@ CHANGES WITH 240: ID. * A new tool systemd-id128 has been added that can be used to determine - and generate various 128bit IDs. + and generate various 128-bit IDs. * /etc/os-release gained two new standardized fields DOCUMENTATION_URL= and LOGO=. @@ -7492,7 +7492,7 @@ CHANGES WITH 240: is improved. * sd-id128.h learnt two new auxiliary helpers: sd_id128_is_allf() and - SD_ID128_ALLF to test if a 128bit ID is set to all 0xFF bytes, and to + SD_ID128_ALLF to test if a 128-bit ID is set to all 0xFF bytes, and to initialize one to all 0xFF. * After loading the SELinux policy systemd will now recursively relabel @@ -9219,9 +9219,9 @@ CHANGES WITH 233: Verity root partitions when systemd boots up. In order to make use of this your partition setup should follow the Discoverable Partitions Specification, and the GPT partition ID of the root file system - partition should be identical to the upper 128bit of the Verity root + partition should be identical to the upper 128-bit of the Verity root hash. The GPT partition ID of the Verity partition protecting it - should be the lower 128bit of the Verity root hash. If the partition + should be the lower 128-bit of the Verity root hash. If the partition image follows this model it is sufficient to specify a single "roothash=" kernel command line argument to both configure which root image and verity partition to use as well as the root hash for @@ -9654,7 +9654,7 @@ CHANGES WITH 232: * The service manager learnt a new "invocation ID" concept for invoked services. Each runtime cycle of a service will get a new invocation - ID (a 128bit random UUID) assigned that identifies the current + ID (a 128-bit random UUID) assigned that identifies the current run of the service uniquely and globally. A new invocation ID is generated each time a service starts up. The journal will store the invocation ID of a service along with any logged messages, thus diff --git a/docs/BOOT_LOADER_INTERFACE.md b/docs/BOOT_LOADER_INTERFACE.md index 267fcc55a0a..7131baf005a 100644 --- a/docs/BOOT_LOADER_INTERFACE.md +++ b/docs/BOOT_LOADER_INTERFACE.md @@ -67,7 +67,7 @@ variables. All EFI variables use the vendor UUID identifier that was booted. It is set by the boot loader and read by the OS in order to identify which entry has been used for the current boot. -* The EFI variable `LoaderFeatures` contains a 64bit unsigned integer with a +* The EFI variable `LoaderFeatures` contains a 64-bit unsigned integer with a number of flags bits that are set by the boot loader and passed to the OS and indicate the features the boot loader supports. Specifically, the following bits are defined: diff --git a/docs/BUILDING_IMAGES.md b/docs/BUILDING_IMAGES.md index c7f7d496385..15ca27845e7 100644 --- a/docs/BUILDING_IMAGES.md +++ b/docs/BUILDING_IMAGES.md @@ -27,7 +27,7 @@ boot. For that it's essential to: 1. Remove the [`/etc/machine-id`](https://www.freedesktop.org/software/systemd/man/machine-id.html) file or write the string `uninitialized\n` into it. This file is supposed to - carry a 128bit identifier unique to the system. Only when it is reset it + carry a 128-bit identifier unique to the system. Only when it is reset it will be auto-generated on first boot and thus be truly unique. If this file is not reset, and carries a valid ID every instance of the system will come up with the same ID and that will likely lead to problems sooner or later, diff --git a/docs/CODING_STYLE.md b/docs/CODING_STYLE.md index f3eefeaae67..6ec1d977e34 100644 --- a/docs/CODING_STYLE.md +++ b/docs/CODING_STYLE.md @@ -118,7 +118,7 @@ SPDX-License-Identifier: LGPL-2.1-or-later compatibility. Since we typically want to allow adding new enum values to an existing enum type with later API versions, please use the `_SD_ENUM_FORCE_S64()` macro in the enum definition, which forces the size of - the enum to be signed 64bit wide. + the enum to be signed 64-bit wide. - Empty lines to separate code blocks are a good thing, please add them abundantly. However, please stick to one at a time, i.e. multiple empty lines diff --git a/docs/ELF_PACKAGE_METADATA.md b/docs/ELF_PACKAGE_METADATA.md index bbc77ec85d5..6cb3f785b40 100644 --- a/docs/ELF_PACKAGE_METADATA.md +++ b/docs/ELF_PACKAGE_METADATA.md @@ -74,7 +74,7 @@ not contain any control character, nor use `\uXXX` escaping. When it comes to JSON numbers, this specification assumes that JSON parsers processing this information are capable of reproducing the full signed 53bit -integer range (i.e. -2⁵³+1…+2⁵³-1) as well as the full 64bit IEEE floating +integer range (i.e. -2⁵³+1…+2⁵³-1) as well as the full 64-bit IEEE floating point number range losslessly (with the exception of NaN/-inf/+inf, since JSON cannot encode that), as per recommendations of [RFC8259](https://datatracker.ietf.org/doc/html/rfc8259#page-8). Fields in diff --git a/docs/GROUP_RECORD.md b/docs/GROUP_RECORD.md index 381036994e1..c9d51cef9d0 100644 --- a/docs/GROUP_RECORD.md +++ b/docs/GROUP_RECORD.md @@ -33,7 +33,7 @@ same field of user records. A string. `service` → A string, an identifier for the service managing this group record (this field is typically in reverse domain name syntax.) -`lastChangeUSec` → An unsigned 64bit integer, a timestamp (in µs since the UNIX +`lastChangeUSec` → An unsigned 64-bit integer, a timestamp (in µs since the UNIX epoch 1970) of the last time the group record has been modified. (Covers only the `regular`, `perMachine` and `privileged` sections). diff --git a/docs/JOURNAL_EXPORT_FORMATS.md b/docs/JOURNAL_EXPORT_FORMATS.md index 9db2726fc26..2c4078aed92 100644 --- a/docs/JOURNAL_EXPORT_FORMATS.md +++ b/docs/JOURNAL_EXPORT_FORMATS.md @@ -19,7 +19,7 @@ When exporting journal data for other uses or transferring it via the network/lo * Two journal entries that follow each other are separated by a double newline. * Journal fields consisting only of valid non-control UTF-8 codepoints are serialized as they are (i.e. the field name, followed by '=', followed by field data), followed by a newline as separator to the next field. Note that fields containing newlines cannot be formatted like this. Non-control UTF-8 codepoints are the codepoints with value at or above 32 (' '), or equal to 9 (TAB). -* Other journal fields are serialized in a special binary safe way: field name, followed by newline, followed by a binary 64bit little endian size value, followed by the binary field data, followed by a newline as separator to the next field. +* Other journal fields are serialized in a special binary safe way: field name, followed by newline, followed by a binary 64-bit little endian size value, followed by the binary field data, followed by a newline as separator to the next field. * Entry metadata that is not actually a field is serialized like it was a field, but beginning with two underscores. More specifically, `__CURSOR=`, `__REALTIME_TIMESTAMP=`, `__MONOTONIC_TIMESTAMP=`, `__SEQNUM=`, `__SEQNUM_ID` are introduced this way. Note that these meta-fields are only generated when actual journal files are serialized. They are omitted for entries that do not originate from a journal file (for example because they are transferred for the first time to be stored in one). Or in other words: if you are generating this format you shouldn't care about these special double-underscore fields. But you might find them usable when you deserialize the format generated by us. Additional fields prefixed with two underscores might be added later on, your parser should skip over the fields it does not know. * The order in which fields appear in an entry is undefined and might be different for each entry that is serialized. And that's already it. diff --git a/docs/JOURNAL_FILE_FORMAT.md b/docs/JOURNAL_FILE_FORMAT.md index ede9d923a48..a3edb56c88e 100644 --- a/docs/JOURNAL_FILE_FORMAT.md +++ b/docs/JOURNAL_FILE_FORMAT.md @@ -71,15 +71,15 @@ thread](https://lists.freedesktop.org/archives/systemd-devel/2012-October/007054 ## Basics -* All offsets, sizes, time values, hashes (and most other numeric values) are 32bit/64bit unsigned integers in LE format. +* All offsets, sizes, time values, hashes (and most other numeric values) are 32-bit/64-bit unsigned integers in LE format. * Offsets are always relative to the beginning of the file. -* The 64bit hash function siphash24 is used for newer journal files. For older files [Jenkins lookup3](https://en.wikipedia.org/wiki/Jenkins_hash_function) is used, more specifically `jenkins_hashlittle2()` with the first 32bit integer it returns as higher 32bit part of the 64bit value, and the second one uses as lower 32bit part. -* All structures are aligned to 64bit boundaries and padded to multiples of 64bit +* The 64-bit hash function siphash24 is used for newer journal files. For older files [Jenkins lookup3](https://en.wikipedia.org/wiki/Jenkins_hash_function) is used, more specifically `jenkins_hashlittle2()` with the first 32-bit integer it returns as higher 32-bit part of the 64-bit value, and the second one uses as lower 32-bit part. +* All structures are aligned to 64-bit boundaries and padded to multiples of 64-bit * The format is designed to be read and written via memory mapping using multiple mapped windows. * All time values are stored in usec since the respective epoch. * Wall clock time values are relative to the Unix time epoch, i.e. January 1st, 1970. (`CLOCK_REALTIME`) * Monotonic time values are always stored jointly with the kernel boot ID value (i.e. `/proc/sys/kernel/random/boot_id`) they belong to. They tend to be relative to the start of the boot, but aren't for containers. (`CLOCK_MONOTONIC`) -* Randomized, unique 128bit IDs are used in various locations. These are generally UUID v4 compatible, but this is not a requirement. +* Randomized, unique 128-bit IDs are used in various locations. These are generally UUID v4 compatible, but this is not a requirement. ## General Rules @@ -547,7 +547,7 @@ plus their respective hashes (which are calculated the same way as in the DATA objects, i.e. keyed by the file ID). If the `HEADER_INCOMPATIBLE_COMPACT` flag is set, DATA object offsets are stored -as 32-bit integers instead of 64bit and the unused hash field per data object is +as 32-bit integers instead of 64-bit and the unused hash field per data object is not stored anymore. In the file ENTRY objects are written ordered monotonically by sequence @@ -615,7 +615,7 @@ arrays are strictly sorted by offsets on disk, and hence by their timestamps and sequence numbers (with some restrictions, see above). If the `HEADER_INCOMPATIBLE_COMPACT` flag is set, offsets are stored as 32-bit -integers instead of 64bit. +integers instead of 64-bit. Entry Arrays are chained up. If one entry array is full another one is allocated and the **next_entry_array_offset** field of the old one pointed to diff --git a/docs/JOURNAL_NATIVE_PROTOCOL.md b/docs/JOURNAL_NATIVE_PROTOCOL.md index 77fb27fa076..ce00d7e1ae9 100644 --- a/docs/JOURNAL_NATIVE_PROTOCOL.md +++ b/docs/JOURNAL_NATIVE_PROTOCOL.md @@ -70,7 +70,7 @@ key `FOO` with a value `BAR` is serialized `F`, `O`, `O`, `=`, `B`, `A`, `R`, * The second method should be used if the value of a field contains a `\n` byte. In this case, the key name is serialized as is, followed by a `\n` -character, followed by a (non-aligned) little-endian unsigned 64bit integer +character, followed by a (non-aligned) little-endian unsigned 64-bit integer encoding the size of the value, followed by the literal value data, followed by `\n`. Example: a key `FOO` with a value `BAR` may be serialized using this second method as: `F`, `O`, `O`, `\n`, `\003`, `\000`, `\000`, `\000`, `\000`, diff --git a/docs/UIDS-GIDS.md b/docs/UIDS-GIDS.md index db4cac4cc32..9274b7af801 100644 --- a/docs/UIDS-GIDS.md +++ b/docs/UIDS-GIDS.md @@ -18,14 +18,14 @@ validity for GIDs too. ## Special Linux UIDs -In theory, the range of the C type `uid_t` is 32bit wide on Linux, +In theory, the range of the C type `uid_t` is 32-bit wide on Linux, i.e. 0…4294967295. However, four UIDs are special on Linux: 1. 0 → The `root` super-user 2. 65534 → The `nobody` UID, also called the "overflow" UID or similar. It's where various subsystems map unmappable users to, for example file systems - only supporting 16bit UIDs, NFS or user namespacing. (The latter can be + only supporting 16-bit UIDs, NFS or user namespacing. (The latter can be changed with a sysctl during runtime, but that's not supported on `systemd`. If you do change it you void your warranty.) Because Fedora is a bit confused the `nobody` user is called `nfsnobody` there (and they have a @@ -33,13 +33,13 @@ i.e. 0…4294967295. However, four UIDs are special on Linux: though. (Also, some distributions call the `nobody` group `nogroup`. I wish they didn't.) -3. 4294967295, aka "32bit `(uid_t) -1`" → This UID is not a valid user ID, as +3. 4294967295, aka "32-bit `(uid_t) -1`" → This UID is not a valid user ID, as `setresuid()`, `chown()` and friends treat -1 as a special request to not change the UID of the process/file. This UID is hence not available for assignment to users in the user database. -4. 65535, aka "16bit `(uid_t) -1`" → Before Linux kernel 2.4 `uid_t` used to be - 16bit, and programs compiled for that would hence assume that `(uid_t) -1` +4. 65535, aka "16-bit `(uid_t) -1`" → Before Linux kernel 2.4 `uid_t` used to be + 16-bit, and programs compiled for that would hence assume that `(uid_t) -1` is 65535. This UID is hence not usable either. The `nss-systemd` glibc NSS module will synthesize user database records for @@ -108,7 +108,7 @@ but downstreams are strongly advised against doing that.) 2. 61184…65519 → UIDs for dynamic users are allocated from this range (see the `DynamicUser=` documentation in [`systemd.exec(5)`](https://www.freedesktop.org/software/systemd/man/systemd.exec.html)). This - range has been chosen so that it is below the 16bit boundary (i.e. below + range has been chosen so that it is below the 16-bit boundary (i.e. below 65535), in order to provide compatibility with container environments that assign a 64K range of UIDs to containers using user namespacing. This range is above the 60000 boundary, so that its allocations are unlikely to be @@ -122,15 +122,15 @@ but downstreams are strongly advised against doing that.) 3. 524288…1879048191 → UID range for `systemd-nspawn`'s automatic allocation of per-container UID ranges. When the `--private-users=pick` switch is used (or - `-U`) then it will automatically find a so far unused 16bit subrange of this + `-U`) then it will automatically find a so far unused 16-bit subrange of this range and assign it to the container. The range is picked so that the upper - 16bit of the 32bit UIDs are constant for all users of the container, while - the lower 16bit directly encode the 65536 UIDs assigned to the - container. This mode of allocation means that the upper 16bit of any UID - assigned to a container are kind of a "container ID", while the lower 16bit + 16-bit of the 32-bit UIDs are constant for all users of the container, while + the lower 16-bit directly encode the 65536 UIDs assigned to the + container. This mode of allocation means that the upper 16-bit of any UID + assigned to a container are kind of a "container ID", while the lower 16-bit directly expose the container's own UID numbers. If you wonder why precisely these numbers, consider them in hexadecimal: 0x00080000…0x6FFFFFFF. This - range is above the 16bit boundary. Moreover it's below the 31bit boundary, + range is above the 16-bit boundary. Moreover it's below the 31-bit boundary, as some broken code (specifically: the kernel's `devpts` file system) erroneously considers UIDs signed integers, and hence can't deal with values above 2^31. The `systemd-machined.service` service will synthesize user @@ -185,7 +185,7 @@ assign to your containers, here are a few recommendations: 1. Definitely, don't assign less than 65536 UIDs/GIDs. After all the `nobody` user has magic properties, and hence should be available in your container, and -given that it's assigned the UID 65534, you should really cover the full 16bit +given that it's assigned the UID 65534, you should really cover the full 16-bit range in your container. Note that systemd will — as mentioned — synthesize user records for the `nobody` user, and assumes its availability in various other parts of its codebase, too, hence assigning fewer users means you lose @@ -195,15 +195,15 @@ other packages make similar restrictions. 2. While it's fine to assign more than 65536 UIDs/GIDs to a container, there's most likely not much value in doing so, as Linux distributions won't use the higher ranges by default (as mentioned neither `adduser` nor `systemd`'s -dynamic user concept allocate from above the 16bit range). Unless you actively +dynamic user concept allocate from above the 16-bit range). Unless you actively care for nested containers, it's hence probably a good idea to allocate exactly 65536 UIDs per container, and neither less nor more. A pretty side-effect is that by doing so, you expose the same number of UIDs per container as Linux 2.2 supported for the whole system, back in the days. 3. Consider allocating UID ranges for containers so that the first UID you -assign has the lower 16bits all set to zero. That way, the upper 16bits become -a container ID of some kind, while the lower 16bits directly encode the +assign has the lower 16-bits all set to zero. That way, the upper 16-bits become +a container ID of some kind, while the lower 16-bits directly encode the internal container UID. This is the way `systemd-nspawn` allocates UID ranges (see above). Following this allocation logic ensures best compatibility with `systemd-nspawn` and all other container managers following the scheme, as it @@ -212,7 +212,7 @@ as that's what they do, too. Moreover, it makes `chown()`ing container file system trees nicely robust to interruptions: as the external UID encodes the internal UID in a fixed way, it's very easy to adjust the container's base UID without the need to know the original base UID: to change the container base, -just mask away the upper 16bit, and insert the upper 16bit of the new container +just mask away the upper 16-bit, and insert the upper 16-bit of the new container base instead. Here are the easy conversions to derive the internal UID, the external UID, and the container base UID from each other: @@ -264,17 +264,17 @@ i.e. somewhere below `/var/` or similar. | 6…999 | System users | Distributions | `/etc/passwd` | | 1000…60000 | Regular users | Distributions | `/etc/passwd` + LDAP/NIS/… | | 60001…60513 | Human users (homed) | `systemd` | `nss-systemd` | -| 60514…60577 | Host users mapped into containers | `systemd` | `systemd-nspawn` | +| 60514…60577 | Host users mapped into containers | `systemd` | `systemd-nspawn` | | 60578…61183 | Unused | | | | 61184…65519 | Dynamic service users | `systemd` | `nss-systemd` | | 65520…65533 | Unused | | | | 65534 | `nobody` user | Linux | `/etc/passwd` + `nss-systemd` | -| 65535 | 16bit `(uid_t) -1` | Linux | | +| 65535 | 16-bit `(uid_t) -1` | Linux | | | 65536…524287 | Unused | | | | 524288…1879048191 | Container UID ranges | `systemd` | `nss-systemd` | | 1879048192…2147483647 | Unused | | | | 2147483648…4294967294 | HIC SVNT LEONES | | | -| 4294967295 | 32bit `(uid_t) -1` | Linux | | +| 4294967295 | 32-bit `(uid_t) -1` | Linux | | Note that "Unused" in the table above doesn't mean that these ranges are really unused. It just means that these ranges have no well-established @@ -285,7 +285,7 @@ ranges. Note that the range 2147483648…4294967294 (i.e. 2^31…2^32-2) should be handled with care. Various programs (including kernel file systems — see `devpts` — or even kernel syscalls – see `setfsuid()`) have trouble with UIDs outside of the -signed 32bit range, i.e any UIDs equal to or above 2147483648. It is thus +signed 32-bit range, i.e any UIDs equal to or above 2147483648. It is thus strongly recommended to stay away from this range in order to avoid complications. This range should be considered reserved for future, special purposes. diff --git a/docs/USER_RECORD.md b/docs/USER_RECORD.md index 768f9d0072a..381c981a073 100644 --- a/docs/USER_RECORD.md +++ b/docs/USER_RECORD.md @@ -269,13 +269,13 @@ disposition of a user automatically from a record even in absence of this field, based on other fields, for example the numeric UID. By setting this field explicitly applications can override this default determination. -`lastChangeUSec` → An unsigned 64bit integer value, referring to a timestamp in µs +`lastChangeUSec` → An unsigned 64-bit integer value, referring to a timestamp in µs since the epoch 1970, indicating when the user record (specifically, any of the `regular`, `privileged`, `perMachine` sections) was last changed. This field is used when comparing two records of the same user to identify the newer one, and is used for example for automatic updating of user records, where appropriate. -`lastPasswordChangeUSec` → Similar, also an unsigned 64bit integer value, +`lastPasswordChangeUSec` → Similar, also an unsigned 64-bit integer value, indicating the point in time the password (or any authentication token) of the user was last changed. This corresponds to the `sp_lstchg` field of `struct spwd`, i.e. the matching field in the user shadow database `/etc/shadow`, @@ -338,7 +338,7 @@ i.e. logins are permitted. This field corresponds to the `sp_expire` field of `struct spwd` (i.e. the `/etc/shadow` data for a user) being set to zero or one. -`notBeforeUSec` → An unsigned 64bit integer value, indicating a time in µs since +`notBeforeUSec` → An unsigned 64-bit integer value, indicating a time in µs since the UNIX epoch (1970) before which the record should be considered invalid for the purpose of logging in. @@ -360,7 +360,7 @@ mounted from a Windows File Share. The five latter types are primarily used by `systemd-homed` when managing home directories, but may be used if other managers are used too. If this is not set, `classic` is the implied default. -`diskSize` → An unsigned 64bit integer, indicating the intended home directory +`diskSize` → An unsigned 64-bit integer, indicating the intended home directory disk space in bytes to assign to the user. Depending on the selected storage type this might be implemented differently: for `luks` this is the intended size of the file system and LUKS volume, while for the others this likely translates @@ -378,7 +378,7 @@ directory is first created, and defaults to `/etc/skel` if not defined. `accessMode` → Takes an unsigned integer in the range 0…511 indicating the UNIX access mask for the home directory when it is first created. -`tasksMax` → Takes an unsigned 64bit integer indicating the maximum number of +`tasksMax` → Takes an unsigned 64-bit integer indicating the maximum number of tasks the user may start in parallel during system runtime. This counts all tasks (i.e. threads, where each process is at least one thread) the user starts or that are forked from these processes even if the user identity is changed (for example @@ -387,7 +387,7 @@ by setuid binaries/`su`/`sudo` and similar). enforces this by setting the `TasksMax` slice property for the user's slice `user-$UID.slice`. -`memoryHigh`/`memoryMax` → These take unsigned 64bit integers indicating upper +`memoryHigh`/`memoryMax` → These take unsigned 64-bit integers indicating upper memory limits for all processes of the user (plus all processes forked off them that might have changed user identity), in bytes. Enforced by [`systemd-logind.service`](https://www.freedesktop.org/software/systemd/man/systemd-logind.service.html), @@ -490,20 +490,20 @@ the PBKDF operation for the LUKS storage mechanism. `luksPbkdfType` → A string, indicating the PBKDF type to use for the LUKS storage mechanism. -`luksPbkdfForceIterations` → An unsigned 64bit integer, indicating the intended +`luksPbkdfForceIterations` → An unsigned 64-bit integer, indicating the intended number of iterations for the PBKDF operation, when LUKS storage is used. -`luksPbkdfTimeCostUSec` → An unsigned 64bit integer, indicating the intended +`luksPbkdfTimeCostUSec` → An unsigned 64-bit integer, indicating the intended time cost for the PBKDF operation, when the LUKS storage mechanism is used, in µs. Ignored when `luksPbkdfForceIterations` is set. -`luksPbkdfMemoryCost` → An unsigned 64bit integer, indicating the intended +`luksPbkdfMemoryCost` → An unsigned 64-bit integer, indicating the intended memory cost for the PBKDF operation, when LUKS storage is used, in bytes. -`luksPbkdfParallelThreads` → An unsigned 64bit integer, indicating the intended +`luksPbkdfParallelThreads` → An unsigned 64-bit integer, indicating the intended required parallel threads for the PBKDF operation, when LUKS storage is used. -`luksSectorSize` → An unsigned 64bit integer, indicating the sector size to +`luksSectorSize` → An unsigned 64-bit integer, indicating the sector size to use for the LUKS storage mechanism, in bytes. Must be a power of two between 512 and 4096. @@ -524,13 +524,13 @@ record. It is recommended to use reverse domain name notation for this. For example, if `systemd-homed` manages a user a string of `io.systemd.Home` is used for this. -`rateLimitIntervalUSec` → An unsigned 64bit integer that configures the +`rateLimitIntervalUSec` → An unsigned 64-bit integer that configures the authentication rate limiting enforced on the user account. This specifies a timer interval (in µs) within which to count authentication attempts. When the counter goes above the value configured n `rateLimitIntervalBurst` log-ins are temporarily refused until the interval passes. -`rateLimitIntervalBurst` → An unsigned 64bit integer, closely related to +`rateLimitIntervalBurst` → An unsigned 64-bit integer, closely related to `rateLimitIntervalUSec`, that puts a limit on authentication attempts within the configured time interval. @@ -543,7 +543,7 @@ it is bypassed. auto-login. Systems are supposed to automatically log in a user marked this way during boot, if there's exactly one user on it defined this way. -`stopDelayUSec` → An unsigned 64bit integer, indicating the time in µs the +`stopDelayUSec` → An unsigned 64-bit integer, indicating the time in µs the per-user service manager is kept around after the user fully logged out. This value is honored by [`systemd-logind.service`](https://www.freedesktop.org/software/systemd/man/systemd-logind.service.html). If @@ -557,17 +557,17 @@ automatically killed when the user logs out. This is enforced by [`systemd-logind.service`](https://www.freedesktop.org/software/systemd/man/systemd-logind.service.html). If false any processes left around when the user logs out are left running. -`passwordChangeMinUSec`/`passwordChangeMaxUSec` → An unsigned 64bit integer, +`passwordChangeMinUSec`/`passwordChangeMaxUSec` → An unsigned 64-bit integer, encoding how much time has to pass at least/at most between password changes of the user. This corresponds with the `sp_min` and `sp_max` fields of `struct spwd` (i.e. the `/etc/shadow` entries of the user), but offers finer granularity. -`passwordChangeWarnUSec` → An unsigned 64bit integer, encoding how much time to +`passwordChangeWarnUSec` → An unsigned 64-bit integer, encoding how much time to warn the user before their password expires, in µs. This corresponds with the `sp_warn` field of `struct spwd`. -`passwordChangeInactiveUSec` → An unsigned 64bit integer, encoding how much +`passwordChangeInactiveUSec` → An unsigned 64-bit integer, encoding how much time has to pass after the password expired that the account is deactivated. This corresponds with the `sp_inact` field of `struct spwd`. @@ -717,7 +717,7 @@ in full). The following fields are defined in this section: -`matchMachineId` → An array of strings that are formatted 128bit IDs in +`matchMachineId` → An array of strings that are formatted 128-bit IDs in hex. If any of the specified IDs match the system's local machine ID (i.e. matches `/etc/machine-id`) the fields in this object are honored. @@ -799,26 +799,26 @@ sub-object of the top-level user record object is keyed by the machine ID, which points to the object with the fields defined here. The following fields are defined: -`diskUsage` → An unsigned 64bit integer. The currently used disk space of the +`diskUsage` → An unsigned 64-bit integer. The currently used disk space of the home directory in bytes. This value might be determined in different ways, depending on the selected storage mechanism. For LUKS storage this is the file size of the loopback file or block device size. For the directory/subvolume/fscrypt storage this is the current disk space used as reported by the file system quota subsystem. -`diskFree` → An unsigned 64bit integer, denoting the number of "free" bytes in +`diskFree` → An unsigned 64-bit integer, denoting the number of "free" bytes in the disk space allotment, i.e. usually the difference between the disk size as reported by `diskSize` and the used already as reported in `diskFree`, but possibly skewed by metadata sizes, disk compression and similar. -`diskSize` → An unsigned 64bit integer, denoting the disk space currently +`diskSize` → An unsigned 64-bit integer, denoting the disk space currently allotted to the user, in bytes. Depending on the storage mechanism this can mean different things (see above). In contrast to the top-level field of the same (or the one in the `perMachine` section), this field reports the current size allotted to the user, not the intended one. The values may differ when user records are updated without the home directory being re-sized. -`diskCeiling`/`diskFloor` → Unsigned 64bit integers indicating upper and lower +`diskCeiling`/`diskFloor` → Unsigned 64-bit integers indicating upper and lower bounds when changing the `diskSize` value, in bytes. These values are typically derived from the underlying data storage, and indicate in which range the home directory may be re-sized in, i.e. in which sensible range the `diskSize` value @@ -851,27 +851,27 @@ recognized by the local manager but whose private key is not available locally. This means the user record cannot be modified locally as it couldn't be signed afterwards. -`goodAuthenticationCounter` → An unsigned 64bit integer. This counter is +`goodAuthenticationCounter` → An unsigned 64-bit integer. This counter is increased by one on every successful authentication attempt, i.e. an authentication attempt where a security token of some form was presented and it was correct. -`badAuthenticationCounter` → An unsigned 64bit integer. This counter is +`badAuthenticationCounter` → An unsigned 64-bit integer. This counter is increased by one on every unsuccessfully authentication attempt, i.e. an authentication attempt where a security token of some form was presented and it was incorrect. -`lastGoodAuthenticationUSec` → An unsigned 64bit integer, indicating the time +`lastGoodAuthenticationUSec` → An unsigned 64-bit integer, indicating the time of the last successful authentication attempt in µs since the UNIX epoch (1970). `lastBadAuthenticationUSec` → Similar, but the timestamp of the last unsuccessfully authentication attempt. -`rateLimitBeginUSec` → An unsigned 64bit integer: the µs timestamp since the +`rateLimitBeginUSec` → An unsigned 64-bit integer: the µs timestamp since the UNIX epoch (1970) where the most recent rate limiting interval has been started, as configured with `rateLimitIntervalUSec`. -`rateLimitCount` → An unsigned 64bit integer, counting the authentication +`rateLimitCount` → An unsigned 64-bit integer, counting the authentication attempts in the current rate limiting interval, see above. If this counter grows beyond the value configured in `rateLimitBurst` authentication attempts are temporarily refused. diff --git a/man/coredump.conf.xml b/man/coredump.conf.xml index 7a617b19857..f36a6e1eae2 100644 --- a/man/coredump.conf.xml +++ b/man/coredump.conf.xml @@ -86,7 +86,7 @@ The maximum size in bytes of a core which will be processed. Core dumps exceeding this size may be stored, but the backtrace will not be generated. Like other sizes in this same config file, the usual suffixes to the base of 1024 are allowed (B, K, M, G, T, P, and E). Defaults - to 1G on 32bit systems, 32G on 64bit systems. + to 1G on 32-bit systems, 32G on 64-bit systems. Setting Storage=none and ProcessSizeMax=0 disables all coredump handling except for a log entry. diff --git a/man/repart.d.xml b/man/repart.d.xml index 8fe2fc3199f..19694cfbb89 100644 --- a/man/repart.d.xml +++ b/man/repart.d.xml @@ -76,13 +76,13 @@ The GPT partition type UUID to match. This may be a GPT partition type UUID such as 4f68bce3-e8cd-4db1-96e7-fbcaf984b709, or an identifier. Architecture specific partition types can use one of these architecture identifiers: - alpha, arc, arm (32bit), - arm64 (64bit, aka aarch64), ia64, + alpha, arc, arm (32-bit), + arm64 (64-bit, aka aarch64), ia64, loongarch64, mips-le, mips64-le, parisc, ppc, ppc64, ppc64-le, riscv32, riscv64, s390, s390x, tilegx, - x86 (32bit, aka i386) and x86-64 (64bit, aka amd64). + x86 (32-bit, aka i386) and x86-64 (64-bit, aka amd64). The supported identifiers are: @@ -158,7 +158,7 @@ root-secondary - Root file system partition of the secondary architecture of the local architecture (usually the matching 32bit architecture for the local 64bit architecture) + Root file system partition of the secondary architecture of the local architecture (usually the matching 32-bit architecture for the local 64-bit architecture) @@ -203,7 +203,7 @@ usr-secondary - /usr/ file system partition of the secondary architecture of the local architecture (usually the matching 32bit architecture for the local 64bit architecture) + /usr/ file system partition of the secondary architecture of the local architecture (usually the matching 32-bit architecture for the local 64-bit architecture) @@ -572,7 +572,7 @@ Flags= - Configures the 64bit GPT partition flags field to set for the partition when creating + Configures the 64-bit GPT partition flags field to set for the partition when creating it. This option has no effect if the partition already exists. If not specified the flags values is set to all zeroes, except for the three bits that can also be configured via NoAuto=, ReadOnly= and GrowFileSystem=; see diff --git a/man/sd-event.xml b/man/sd-event.xml index 834eaeae854..276770f61da 100644 --- a/man/sd-event.xml +++ b/man/sd-event.xml @@ -111,7 +111,7 @@ other event sources or at event loop termination. See sd_event_add_defer3. - Event sources may be assigned a 64bit priority + Event sources may be assigned a 64-bit priority value, that controls the order in which event sources are dispatched if multiple are pending simultaneously. See sd_event_source_set_priority3. diff --git a/man/sd_bus_get_n_queued_read.xml b/man/sd_bus_get_n_queued_read.xml index 3b0f6148f88..39476463b2e 100644 --- a/man/sd_bus_get_n_queued_read.xml +++ b/man/sd_bus_get_n_queued_read.xml @@ -47,7 +47,7 @@ sd_bus_get_n_queued_read() may be used to query the number of bus messages in the read queue of a bus connection object. The read queue contains all messages read from the transport medium (e.g. network socket) but not yet processed locally. The function expects two arguments: the bus object to query, and a pointer - to a 64bit counter variable to write the current queue size to. Use sd_bus_process() in + to a 64-bit counter variable to write the current queue size to. Use sd_bus_process() in order to process queued messages, i.e. to reduce the size of the read queue (as well as, in fact, the write queue, see below). diff --git a/man/sd_bus_message_read_basic.xml b/man/sd_bus_message_read_basic.xml index 55951430e6e..c78f9491477 100644 --- a/man/sd_bus_message_read_basic.xml +++ b/man/sd_bus_message_read_basic.xml @@ -87,7 +87,7 @@ y SD_BUS_TYPE_BYTE - 8bit unsigned integer + 8-bit unsigned integer uint8_t * @@ -101,42 +101,42 @@ n SD_BUS_TYPE_INT16 - 16bit signed integer + 16-bit signed integer int16_t * q SD_BUS_TYPE_UINT16 - 16bit unsigned integer + 16-bit unsigned integer uint16_t * i SD_BUS_TYPE_INT32 - 32bit signed integer + 32-bit signed integer int32_t * u SD_BUS_TYPE_UINT32 - 32bit unsigned integer + 32-bit unsigned integer uint32_t * x SD_BUS_TYPE_INT64 - 64bit signed integer + 64-bit signed integer int64_t * t SD_BUS_TYPE_UINT64 - 64bit unsigned integer + 64-bit unsigned integer uint64_t * diff --git a/man/sd_event_source_set_priority.xml b/man/sd_event_source_set_priority.xml index efe05b11d26..6cc643822b3 100644 --- a/man/sd_event_source_set_priority.xml +++ b/man/sd_event_source_set_priority.xml @@ -56,7 +56,7 @@ sd_event_source_set_priority() may be used to set the priority for the event source object specified as source. The priority is specified as an - arbitrary signed 64bit integer. The priority is initialized to + arbitrary signed 64-bit integer. The priority is initialized to SD_EVENT_PRIORITY_NORMAL (0) when the event source is allocated with a call such as sd_event_add_io3 @@ -70,7 +70,7 @@ SD_EVENT_PRIORITY_IDLE (100) may be used to indicate event sources that shall be dispatched early, normally or late. It is recommended to specify priorities based on these - definitions, and relative to them — however, the full 64bit + definitions, and relative to them — however, the full 64-bit signed integer range is available for ordering event sources. diff --git a/man/sd_event_wait.xml b/man/sd_event_wait.xml index 0dc7105cf9c..dedf3c40be5 100644 --- a/man/sd_event_wait.xml +++ b/man/sd_event_wait.xml @@ -121,7 +121,7 @@ of the states described below. sd_event_get_iteration() may be used to determine the current iteration of the event - loop. It returns an unsigned 64bit integer containing a counter that increases monotonically with each iteration of + loop. It returns an unsigned 64-bit integer containing a counter that increases monotonically with each iteration of the event loop, starting with 0. The counter is increased at the time of the sd_event_prepare() invocation. diff --git a/man/sd_id128_to_string.xml b/man/sd_id128_to_string.xml index e0338bae85f..1dad90e1f78 100644 --- a/man/sd_id128_to_string.xml +++ b/man/sd_id128_to_string.xml @@ -71,7 +71,7 @@ a string representation of a 128-bit ID in a buffer that is valid in the current code block. sd_id128_to_uuid_string() and SD_ID128_TO_UUID_STRING() - are similar to these two functions/macros, but format the 128bit values as RFC4122 UUIDs, i.e. a series + are similar to these two functions/macros, but format the 128-bit values as RFC4122 UUIDs, i.e. a series of 36 lowercase hexadeciaml digits and dashes, terminated by a NUL byte. sd_id128_from_string() implements the reverse operation: it takes a 33 diff --git a/man/sd_journal_get_seqnum.xml b/man/sd_journal_get_seqnum.xml index 1fc7e6030a6..9cbf7f6495b 100644 --- a/man/sd_journal_get_seqnum.xml +++ b/man/sd_journal_get_seqnum.xml @@ -39,11 +39,11 @@ sd_journal_get_seqnum() returns the sequence number of the current journal entry. It takes three arguments: the journal context object, a pointer to a 64-bit unsigned integer to - store the sequence number in, and a buffer to return the 128bit sequence number ID in. + store the sequence number in, and a buffer to return the 128-bit sequence number ID in. When writing journal entries to disk each systemd-journald instance will number them sequentially, starting from 1 for the first entry written after subsystem initialization. Each such - series of sequence numbers is associated with a 128bit sequence number ID which is initialized randomly, + series of sequence numbers is associated with a 128-bit sequence number ID which is initialized randomly, once at systemd-journal initialization. Thus, while multiple instances of systemd-journald will assign the same sequence numbers to their written journal entries, they will have a distinct sequence number IDs. The sequence number is assigned at the moment of diff --git a/man/systemctl.xml b/man/systemctl.xml index 2d2434bbd06..cc7d2ea08a2 100644 --- a/man/systemctl.xml +++ b/man/systemctl.xml @@ -2224,7 +2224,7 @@ Jan 12 10:46:45 example.com bluetoothd[8900]: gatt-time-server: Input/output err project='man-pages'>sigqueue3 system call, rather than kill3. The - specified value must be a 32bit signed integer, and may be specified either in decimal, in + specified value must be a 32-bit signed integer, and may be specified either in decimal, in hexadecimal (if prefixed with 0x), octal (if prefixed with 0o) or binary (if prefixed with 0b) diff --git a/man/systemd-veritysetup-generator.xml b/man/systemd-veritysetup-generator.xml index 71bc1fda64b..cbf754985d5 100644 --- a/man/systemd-veritysetup-generator.xml +++ b/man/systemd-veritysetup-generator.xml @@ -64,8 +64,8 @@ characters of the appropriate length (i.e. most likely 256 bit/64 characters, or longer). If not specified via systemd.verity_root_data= and systemd.verity_root_hash=, the hash and data devices to use are automatically derived from the specified hash value. Specifically, the data partition - device is looked for under a GPT partition UUID derived from the first 128bit of the root hash, the hash - partition device is looked for under a GPT partition UUID derived from the last 128bit of the root hash. Hence + device is looked for under a GPT partition UUID derived from the first 128-bit of the root hash, the hash + partition device is looked for under a GPT partition UUID derived from the last 128-bit of the root hash. Hence it is usually sufficient to specify the root hash to boot from a verity protected root file system, as device paths are automatically determined from it — as long as the partition table is properly set up. diff --git a/man/systemd.exec.xml b/man/systemd.exec.xml index 3960deac3a0..5a917d83492 100644 --- a/man/systemd.exec.xml +++ b/man/systemd.exec.xml @@ -1143,13 +1143,13 @@ CapabilityBoundingSet=~CAP_B CAP_C ppc, ppc-le, ppc64, ppc64-le, s390 or s390x. Which personality architectures are supported depends on the kernel's native architecture. Usually the - 64bit versions of the various system architectures support their immediate 32bit personality + 64-bit versions of the various system architectures support their immediate 32-bit personality architecture counterpart, but no others. For example, x86-64 systems support the x86-64 and x86 personalities but no others. The personality feature is useful when running 32-bit services on a 64-bit host system. If not specified, the personality is left unmodified and thus reflects the personality of the host system's kernel. This option is not useful on architectures for which only one native word width was ever available, such - as m68k (32bit only) or alpha (64bit only). + as m68k (32-bit only) or alpha (64-bit only). @@ -3505,7 +3505,7 @@ StandardInputData=V2XigLJyZSBubyBzdHJhbmdlcnMgdG8gbG92ZQpZb3Uga25vdyB0aGUgcnVsZX $INVOCATION_ID - Contains a randomized, unique 128bit ID identifying each runtime cycle of the unit, formatted + Contains a randomized, unique 128-bit ID identifying each runtime cycle of the unit, formatted as 32 character hexadecimal string. A new ID is assigned each time the unit changes from an inactive state into an activating or active state, and may be used to identify this specific runtime cycle, in particular in data stored offline, such as the journal. The same ID is passed to all processes run as part of the diff --git a/man/systemd.journal-fields.xml b/man/systemd.journal-fields.xml index 9eaa4ce1fc6..b0102c7db5d 100644 --- a/man/systemd.journal-fields.xml +++ b/man/systemd.journal-fields.xml @@ -376,7 +376,7 @@ _STREAM_ID= - Only applies to _TRANSPORT=stdout records: specifies a randomized 128bit ID assigned + Only applies to _TRANSPORT=stdout records: specifies a randomized 128-bit ID assigned to the stream connection when it was first created. This ID is useful to reconstruct individual log streams from the log records: all log records carrying the same stream ID originate from the same stream. diff --git a/man/systemd.socket.xml b/man/systemd.socket.xml index ccf3998000f..9207d709043 100644 --- a/man/systemd.socket.xml +++ b/man/systemd.socket.xml @@ -341,7 +341,7 @@ Backlog= - Takes an unsigned 32bit integer argument. Specifies the number of connections to + Takes an unsigned 32-bit integer argument. Specifies the number of connections to queue that have not been accepted yet. This setting matters only for stream and sequential packet sockets. See listen2 for diff --git a/src/basic/dirent-util.h b/src/basic/dirent-util.h index 508d34a44f0..f695885948b 100644 --- a/src/basic/dirent-util.h +++ b/src/basic/dirent-util.h @@ -33,7 +33,7 @@ struct dirent *readdir_no_dot(DIR *dirp); /* Maximum space one dirent structure might require at most */ #define DIRENT_SIZE_MAX CONST_MAX(sizeof(struct dirent), offsetof(struct dirent, d_name) + NAME_MAX + 1) -/* Only if 64bit off_t is enabled struct dirent + struct dirent64 are actually the same. We require this, and +/* Only if 64-bit off_t is enabled struct dirent + struct dirent64 are actually the same. We require this, and * we want them to be interchangeable to make getdents64() work, hence verify that. */ assert_cc(_FILE_OFFSET_BITS == 64); #if HAVE_STRUCT_DIRENT64 diff --git a/src/basic/escape.c b/src/basic/escape.c index d2cb1c73205..75a1d68e967 100644 --- a/src/basic/escape.c +++ b/src/basic/escape.c @@ -182,7 +182,7 @@ int cunescape_one(const char *p, size_t length, char32_t *ret, bool *eight_bit, } case 'u': { - /* C++11 style 16bit unicode */ + /* C++11 style 16-bit unicode */ int a[4]; size_t i; @@ -209,7 +209,7 @@ int cunescape_one(const char *p, size_t length, char32_t *ret, bool *eight_bit, } case 'U': { - /* C++11 style 32bit unicode */ + /* C++11 style 32-bit unicode */ int a[8]; size_t i; diff --git a/src/basic/hash-funcs.h b/src/basic/hash-funcs.h index be64289252a..3804e94d986 100644 --- a/src/basic/hash-funcs.h +++ b/src/basic/hash-funcs.h @@ -93,14 +93,14 @@ extern const struct hash_ops trivial_hash_ops; extern const struct hash_ops trivial_hash_ops_free; extern const struct hash_ops trivial_hash_ops_free_free; -/* 32bit values we can always just embed in the pointer itself, but in order to support 32bit archs we need store 64bit +/* 32-bit values we can always just embed in the pointer itself, but in order to support 32-bit archs we need store 64-bit * values indirectly, since they don't fit in a pointer. */ void uint64_hash_func(const uint64_t *p, struct siphash *state); int uint64_compare_func(const uint64_t *a, const uint64_t *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! */ +/* On some archs dev_t is 32-bit, and on others 64-bit. And sometimes it's 64-bit on 32-bit archs, and sometimes 32-bit on + * 64-bit archs. Yuck! */ #if SIZEOF_DEV_T != 8 void devt_hash_func(const dev_t *p, struct siphash *state); #else diff --git a/src/basic/hashmap.c b/src/basic/hashmap.c index 4b8daf4a29c..30931567480 100644 --- a/src/basic/hashmap.c +++ b/src/basic/hashmap.c @@ -174,9 +174,9 @@ struct _packed_ indirect_storage { }; struct direct_storage { - /* This gives us 39 bytes on 64bit, or 35 bytes on 32bit. - * That's room for 4 set_entries + 4 DIB bytes + 3 unused bytes on 64bit, - * or 7 set_entries + 7 DIB bytes + 0 unused bytes on 32bit. */ + /* This gives us 39 bytes on 64-bit, or 35 bytes on 32-bit. + * That's room for 4 set_entries + 4 DIB bytes + 3 unused bytes on 64-bit, + * or 7 set_entries + 7 DIB bytes + 0 unused bytes on 32-bit. */ uint8_t storage[sizeof(struct indirect_storage)]; }; diff --git a/src/basic/limits-util.c b/src/basic/limits-util.c index b4444443aa2..dc0a2a6c94b 100644 --- a/src/basic/limits-util.c +++ b/src/basic/limits-util.c @@ -18,7 +18,7 @@ uint64_t physical_memory(void) { long sc; int r; - /* We return this as uint64_t in case we are running as 32bit process on a 64bit kernel with huge amounts of + /* We return this as uint64_t in case we are running as 32-bit process on a 64-bit kernel with huge amounts of * memory. * * In order to support containers nicely that have a configured memory limit we'll take the minimum of the @@ -126,7 +126,7 @@ uint64_t system_tasks_max(void) { * * This limits the numeric range PIDs can take, and thus indirectly also limits the number of * concurrent threads. It's primarily a compatibility concept: some crappy old code used a signed - * 16bit type for PIDs, hence the kernel provides a way to ensure the PIDs never go beyond + * 16-bit type for PIDs, hence the kernel provides a way to ensure the PIDs never go beyond * INT16_MAX by default. * * Also note the weird definition: PIDs assigned will be kept below this value, which means diff --git a/src/basic/rlimit-util.c b/src/basic/rlimit-util.c index 33dfde9d6c1..91424cd3cce 100644 --- a/src/basic/rlimit-util.c +++ b/src/basic/rlimit-util.c @@ -87,7 +87,7 @@ static int rlimit_parse_u64(const char *val, rlim_t *ret) { return 0; } - /* setrlimit(2) suggests rlim_t is always 64bit on Linux. */ + /* setrlimit(2) suggests rlim_t is always 64-bit on Linux. */ assert_cc(sizeof(rlim_t) == sizeof(uint64_t)); r = safe_atou64(val, &u); diff --git a/src/basic/socket-util.c b/src/basic/socket-util.c index d82d9fe78a6..6951c12c9b7 100644 --- a/src/basic/socket-util.c +++ b/src/basic/socket-util.c @@ -1179,7 +1179,7 @@ void* cmsg_find_and_copy_data(struct msghdr *mh, int level, int type, void *buf, assert(buf_len > 0); /* This is similar to cmsg_find_data(), but copy the found data to buf. This should be typically used - * when reading possibly unaligned data such as timestamp, as time_t is 64bit and size_t is 32bit on + * when reading possibly unaligned data such as timestamp, as time_t is 64-bit and size_t is 32-bit on * RISCV32. See issue #27241. */ cmsg = cmsg_find(mh, level, type, CMSG_LEN(buf_len)); diff --git a/src/basic/socket-util.h b/src/basic/socket-util.h index 37763446bd9..9c4c95bd3a1 100644 --- a/src/basic/socket-util.h +++ b/src/basic/socket-util.h @@ -179,7 +179,7 @@ int flush_accept(int fd); * at compile time, that the requested type has a smaller or same alignment as 'struct cmsghdr', and one * during runtime, that the actual pointer matches the alignment too. This is supposed to catch cases such as * 'struct timeval' is embedded into 'struct cmsghdr' on architectures where the alignment of the former is 8 - * bytes (because of a 64bit time_t), but of the latter is 4 bytes (because size_t is 32bit), such as + * bytes (because of a 64-bit time_t), but of the latter is 4 bytes (because size_t is 32 bits), such as * riscv32. */ #define CMSG_TYPED_DATA(cmsg, type) \ ({ \ @@ -294,7 +294,7 @@ static inline int getsockopt_int(int fd, int level, int optname, int *ret) { int socket_bind_to_ifname(int fd, const char *ifname); int socket_bind_to_ifindex(int fd, int ifindex); -/* Define a 64bit version of timeval/timespec in any case, even on 32bit userspace. */ +/* Define a 64-bit version of timeval/timespec in any case, even on 32-bit userspace. */ struct timeval_large { uint64_t tvl_sec, tvl_usec; }; @@ -302,7 +302,7 @@ struct timespec_large { uint64_t tvl_sec, tvl_nsec; }; -/* glibc duplicates timespec/timeval on certain 32bit archs, once in 32bit and once in 64bit. +/* glibc duplicates timespec/timeval on certain 32-bit arches, once in 32-bit and once in 64-bit. * See __convert_scm_timestamps() in glibc source code. Hence, we need additional buffer space for them * to prevent from recvmsg_safe() returning -EXFULL. */ #define CMSG_SPACE_TIMEVAL \ diff --git a/src/basic/time-util.c b/src/basic/time-util.c index ef3afc904b8..1db630003a4 100644 --- a/src/basic/time-util.c +++ b/src/basic/time-util.c @@ -1661,13 +1661,13 @@ int time_change_fd(void) { if (timerfd_settime(fd, TFD_TIMER_ABSTIME|TFD_TIMER_CANCEL_ON_SET, &its, NULL) >= 0) return TAKE_FD(fd); - /* So apparently there are systems where time_t is 64bit, but the kernel actually doesn't support - * 64bit time_t. In that case configuring a timer to TIME_T_MAX will fail with EOPNOTSUPP or a + /* So apparently there are systems where time_t is 64-bit, but the kernel actually doesn't support + * 64-bit time_t. In that case configuring a timer to TIME_T_MAX will fail with EOPNOTSUPP or a * similar error. If that's the case let's try with INT32_MAX instead, maybe that works. It's a bit * of a black magic thing though, but what can we do? * - * We don't want this code on x86-64, hence let's conditionalize this for systems with 64bit time_t - * but where "long" is shorter than 64bit, i.e. 32bit archs. + * We don't want this code on x86-64, hence let's conditionalize this for systems with 64-bit time_t + * but where "long" is shorter than 64-bit, i.e. 32-bit archs. * * See: https://github.com/systemd/systemd/issues/14362 */ diff --git a/src/basic/time-util.h b/src/basic/time-util.h index e55d23e32df..57283d31a72 100644 --- a/src/basic/time-util.h +++ b/src/basic/time-util.h @@ -222,7 +222,7 @@ static inline int usleep_safe(usec_t usec) { /* The last second we can format is 31. Dec 9999, 1s before midnight, because otherwise we'd enter 5 digit * year territory. However, since we want to stay away from this in all timezones we take one day off. */ #define USEC_TIMESTAMP_FORMATTABLE_MAX_64BIT ((usec_t) 253402214399000000) /* Thu 9999-12-30 23:59:59 UTC */ -/* With a 32bit time_t we can't go beyond 2038... +/* With a 32-bit time_t we can't go beyond 2038... * We parse timestamp with RFC-822/ISO 8601 (e.g. +06, or -03:00) as UTC, hence the upper bound must be off * by USEC_PER_DAY. See parse_timestamp() for more details. */ #define USEC_TIMESTAMP_FORMATTABLE_MAX_32BIT (((usec_t) INT32_MAX) * USEC_PER_SEC - USEC_PER_DAY) diff --git a/src/basic/user-util.c b/src/basic/user-util.c index 6bdf26b42aa..fe61a090055 100644 --- a/src/basic/user-util.c +++ b/src/basic/user-util.c @@ -37,7 +37,7 @@ bool uid_is_valid(uid_t uid) { if (uid == (uid_t) UINT32_C(0xFFFFFFFF)) return false; - /* A long time ago UIDs where 16bit, hence explicitly avoid the 16bit -1 too */ + /* A long time ago UIDs where 16 bit, hence explicitly avoid the 16-bit -1 too */ if (uid == (uid_t) UINT32_C(0xFFFF)) return false; @@ -765,14 +765,14 @@ bool valid_user_group_name(const char *u, ValidUserFlags flags) { if (in_charset(u, "0123456789")) /* Don't allow fully numeric strings, they might be confused * with UIDs (note that this test is more broad than * the parse_uid() test above, as it will cover more than - * the 32bit range, and it will detect 65535 (which is in + * the 32-bit range, and it will detect 65535 (which is in * invalid UID, even though in the unsigned 32 bit range) */ return false; if (u[0] == '-' && in_charset(u + 1, "0123456789")) /* Don't allow negative fully numeric * strings either. After all some people * write 65535 as -1 (even though that's - * not even true on 32bit uid_t + * not even true on 32-bit uid_t * anyway) */ return false; diff --git a/src/basic/user-util.h b/src/basic/user-util.h index 8b829a9ae2e..f394f6251d7 100644 --- a/src/basic/user-util.h +++ b/src/basic/user-util.h @@ -69,13 +69,13 @@ int take_etc_passwd_lock(const char *root); /* If REMOUNT_IDMAPPING_HOST_ROOT is set for remount_idmap() we'll include a mapping here that maps the host * root user accessing the idmapped mount to the this user ID on the backing fs. This is the last valid UID in - * the *signed* 32bit range. You might wonder why precisely use this specific UID for this purpose? Well, we + * the *signed* 32-bit range. You might wonder why precisely use this specific UID for this purpose? Well, we * definitely cannot use the first 0…65536 UIDs for that, since in most cases that's precisely the file range * we intend to map to some high UID range, and since UID mappings have to be bijective we thus cannot use - * them at all. Furthermore the UID range beyond INT32_MAX (i.e. the range above the signed 32bit range) is + * them at all. Furthermore the UID range beyond INT32_MAX (i.e. the range above the signed 32-bit range) is * icky, since many APIs cannot use it (example: setfsuid() returns the old UID as signed integer). Following - * our usual logic of assigning a 16bit UID range to each container, so that the upper 16bit of a 32bit UID - * value indicate kind of a "container ID" and the lower 16bit map directly to the intended user you can read + * our usual logic of assigning a 16-bit UID range to each container, so that the upper 16-bit of a 32-bit UID + * value indicate kind of a "container ID" and the lower 16-bit map directly to the intended user you can read * this specific UID as the "nobody" user of the container with ID 0x7FFF, which is kinda nice. */ #define UID_MAPPED_ROOT ((uid_t) (INT32_MAX-1)) #define GID_MAPPED_ROOT ((gid_t) (INT32_MAX-1)) diff --git a/src/basic/utf8.h b/src/basic/utf8.h index 4a06dd62c5b..962312c5fb9 100644 --- a/src/basic/utf8.h +++ b/src/basic/utf8.h @@ -38,7 +38,7 @@ size_t utf16_encode_unichar(char16_t *out, char32_t c); char *utf16_to_utf8(const char16_t *s, size_t length /* bytes! */); char16_t *utf8_to_utf16(const char *s, size_t length); -size_t char16_strlen(const char16_t *s); /* returns the number of 16bit words in the string (not bytes!) */ +size_t char16_strlen(const char16_t *s); /* returns the number of 16-bit words in the string (not bytes!) */ int utf8_encoded_valid_unichar(const char *str, size_t length); int utf8_encoded_to_unichar(const char *str, char32_t *ret_unichar); diff --git a/src/boot/bootctl-util.c b/src/boot/bootctl-util.c index 7259f177a80..6d886aba354 100644 --- a/src/boot/bootctl-util.c +++ b/src/boot/bootctl-util.c @@ -27,8 +27,8 @@ int sync_everything(void) { } const char *get_efi_arch(void) { - /* Detect EFI firmware architecture of the running system. On mixed mode systems, it could be 32bit - * while the kernel is running in 64bit. */ + /* Detect EFI firmware architecture of the running system. On mixed mode systems, it could be 32-bit + * while the kernel is running in 64-bit. */ #ifdef __x86_64__ _cleanup_free_ char *platform_size = NULL; diff --git a/src/boot/efi/cpio.c b/src/boot/efi/cpio.c index bb3754a3bc7..f56db2e197f 100644 --- a/src/boot/efi/cpio.c +++ b/src/boot/efi/cpio.c @@ -75,7 +75,7 @@ static EFI_STATUS pack_cpio_one( * * See: https://docs.kernel.org/driver-api/early-userspace/buffer-format.html */ - if (contents_size > UINT32_MAX) /* cpio cannot deal with > 32bit file sizes */ + if (contents_size > UINT32_MAX) /* cpio cannot deal with > 32-bit file sizes */ return EFI_LOAD_ERROR; if (*inode_counter == UINT32_MAX) /* more than 2^32-1 inodes? yikes. cpio doesn't support that either */ diff --git a/src/boot/efi/efi-string.c b/src/boot/efi/efi-string.c index 6c6d644c51a..44005912559 100644 --- a/src/boot/efi/efi-string.c +++ b/src/boot/efi/efi-string.c @@ -629,7 +629,7 @@ static bool handle_format_specifier(FormatContext *ctx, SpecifierContext *sp) { /* Parses one item from the format specifier in ctx and put the info into sp. If we are done with * this specifier returns true, otherwise this function should be called again. */ - /* This implementation assumes 32bit ints. Also note that all types smaller than int are promoted to + /* This implementation assumes 32-bit ints. Also note that all types smaller than int are promoted to * int in vararg functions, which is why we fetch only ints for any such types. The compiler would * otherwise warn about fetching smaller types. */ assert_cc(sizeof(int) == 4); diff --git a/src/boot/efi/linux_x86.c b/src/boot/efi/linux_x86.c index f5422e86f2a..757902daac5 100644 --- a/src/boot/efi/linux_x86.c +++ b/src/boot/efi/linux_x86.c @@ -102,19 +102,19 @@ typedef void (*handover_f)(void *parent, EFI_SYSTEM_TABLE *table, BootParams *pa static void linux_efi_handover(EFI_HANDLE parent, uintptr_t kernel, BootParams *params) { assert(params); - kernel += (params->hdr.setup_sects + 1) * KERNEL_SECTOR_SIZE; /* 32bit entry address. */ + kernel += (params->hdr.setup_sects + 1) * KERNEL_SECTOR_SIZE; /* 32-bit entry address. */ /* Old kernels needs this set, while newer ones seem to ignore this. */ params->hdr.code32_start = kernel; #ifdef __x86_64__ - kernel += KERNEL_SECTOR_SIZE; /* 64bit entry address. */ + kernel += KERNEL_SECTOR_SIZE; /* 64-bit entry address. */ #endif - kernel += params->hdr.handover_offset; /* 32/64bit EFI handover address. */ + kernel += params->hdr.handover_offset; /* 32/64-bit EFI handover address. */ - /* Note in EFI mixed mode this now points to the correct 32bit handover entry point, allowing a 64bit - * kernel to be booted from a 32bit sd-stub. */ + /* Note in EFI mixed mode this now points to the correct 32-bit handover entry point, allowing a 64-bit + * kernel to be booted from a 32-bit sd-stub. */ handover_f handover = (handover_f) kernel; handover(parent, ST, params); diff --git a/src/boot/efi/pe.c b/src/boot/efi/pe.c index 9759d036b38..c9bd22704a7 100644 --- a/src/boot/efi/pe.c +++ b/src/boot/efi/pe.c @@ -171,7 +171,7 @@ static uint32_t get_compatibility_entry_address(const DosFileHeader *dos, const static const char *sections[] = { ".compat", NULL }; /* The kernel may provide alternative PE entry points for different PE architectures. This allows - * booting a 64bit kernel on 32bit EFI that is otherwise running on a 64bit CPU. The locations of any + * booting a 64-bit kernel on 32-bit EFI that is otherwise running on a 64-bit CPU. The locations of any * such compat entry points are located in a special PE section. */ locate_sections((const PeSectionHeader *) ((const uint8_t *) dos + section_table_offset(dos, pe)), diff --git a/src/boot/efi/ticks.c b/src/boot/efi/ticks.c index f902b83a99b..852d090e0c5 100644 --- a/src/boot/efi/ticks.c +++ b/src/boot/efi/ticks.c @@ -91,7 +91,7 @@ static uint64_t ticks_freq(void) { uint64_t ticks_end = ticks_read_arch(); if (ticks_end < ticks_start) /* Check for an overflow (which is not that unlikely, given on some - * archs the value is 32bit) */ + * archs the value is 32-bit) */ return 0; cache = (ticks_end - ticks_start) * 1000UL; diff --git a/src/boot/efi/util.h b/src/boot/efi/util.h index 03cd928b2f5..8cb4ed0c1cd 100644 --- a/src/boot/efi/util.h +++ b/src/boot/efi/util.h @@ -147,16 +147,16 @@ static inline void strv_freep(char16_t ***p) { EFI_STATUS open_directory(EFI_FILE *root_dir, const char16_t *path, EFI_FILE **ret); -/* Conversion between EFI_PHYSICAL_ADDRESS and pointers is not obvious. The former is always 64bit, even on - * 32bit archs. And gcc complains if we cast a pointer to an integer of a different size. Hence let's do the +/* Conversion between EFI_PHYSICAL_ADDRESS and pointers is not obvious. The former is always 64-bit, even on + * 32-bit archs. And gcc complains if we cast a pointer to an integer of a different size. Hence let's do the * conversion indirectly: first into uintptr_t and then extended to EFI_PHYSICAL_ADDRESS. */ static inline EFI_PHYSICAL_ADDRESS POINTER_TO_PHYSICAL_ADDRESS(const void *p) { return (EFI_PHYSICAL_ADDRESS) (uintptr_t) p; } static inline void *PHYSICAL_ADDRESS_TO_POINTER(EFI_PHYSICAL_ADDRESS addr) { - /* On 32bit systems the address might not be convertible (as pointers are 32bit but - * EFI_PHYSICAL_ADDRESS 64bit) */ + /* On 32-bit systems the address might not be convertible (as pointers are 32-bit but + * EFI_PHYSICAL_ADDRESS 64-bit) */ assert(addr <= UINTPTR_MAX); return (void *) (uintptr_t) addr; } diff --git a/src/busctl/busctl.c b/src/busctl/busctl.c index b1ea0dea560..eab0c72707e 100644 --- a/src/busctl/busctl.c +++ b/src/busctl/busctl.c @@ -1483,7 +1483,7 @@ static int message_append_cmdline(sd_bus_message *m, const char *signature, char r = safe_atou8(v, &z); if (r < 0) - return log_error_errno(r, "Failed to parse '%s' as byte (unsigned 8bit integer): %m", v); + return log_error_errno(r, "Failed to parse '%s' as byte (unsigned 8-bit integer): %m", v); r = sd_bus_message_append_basic(m, t, &z); break; @@ -1494,7 +1494,7 @@ static int message_append_cmdline(sd_bus_message *m, const char *signature, char r = safe_atoi16(v, &z); if (r < 0) - return log_error_errno(r, "Failed to parse '%s' as signed 16bit integer: %m", v); + return log_error_errno(r, "Failed to parse '%s' as signed 16-bit integer: %m", v); r = sd_bus_message_append_basic(m, t, &z); break; @@ -1505,7 +1505,7 @@ static int message_append_cmdline(sd_bus_message *m, const char *signature, char r = safe_atou16(v, &z); if (r < 0) - return log_error_errno(r, "Failed to parse '%s' as unsigned 16bit integer: %m", v); + return log_error_errno(r, "Failed to parse '%s' as unsigned 16-bit integer: %m", v); r = sd_bus_message_append_basic(m, t, &z); break; @@ -1516,7 +1516,7 @@ static int message_append_cmdline(sd_bus_message *m, const char *signature, char r = safe_atoi32(v, &z); if (r < 0) - return log_error_errno(r, "Failed to parse '%s' as signed 32bit integer: %m", v); + return log_error_errno(r, "Failed to parse '%s' as signed 32-bit integer: %m", v); r = sd_bus_message_append_basic(m, t, &z); break; @@ -1527,7 +1527,7 @@ static int message_append_cmdline(sd_bus_message *m, const char *signature, char r = safe_atou32(v, &z); if (r < 0) - return log_error_errno(r, "Failed to parse '%s' as unsigned 32bit integer: %m", v); + return log_error_errno(r, "Failed to parse '%s' as unsigned 32-bit integer: %m", v); r = sd_bus_message_append_basic(m, t, &z); break; @@ -1538,7 +1538,7 @@ static int message_append_cmdline(sd_bus_message *m, const char *signature, char r = safe_atoi64(v, &z); if (r < 0) - return log_error_errno(r, "Failed to parse '%s' as signed 64bit integer: %m", v); + return log_error_errno(r, "Failed to parse '%s' as signed 64-bit integer: %m", v); r = sd_bus_message_append_basic(m, t, &z); break; @@ -1549,7 +1549,7 @@ static int message_append_cmdline(sd_bus_message *m, const char *signature, char r = safe_atou64(v, &z); if (r < 0) - return log_error_errno(r, "Failed to parse '%s' as unsigned 64bit integer: %m", v); + return log_error_errno(r, "Failed to parse '%s' as unsigned 64-bit integer: %m", v); r = sd_bus_message_append_basic(m, t, &z); break; diff --git a/src/core/bpf-firewall.c b/src/core/bpf-firewall.c index 0861b4b8291..66773e18278 100644 --- a/src/core/bpf-firewall.c +++ b/src/core/bpf-firewall.c @@ -70,7 +70,7 @@ static int add_lookup_instructions( } do { - /* Compare IPv4 with one word instruction (32bit) */ + /* Compare IPv4 with one word instruction (32-bit) */ struct bpf_insn insn[] = { /* If skb->protocol != ETH_P_IP, skip this whole block. The offset will be set later. */ BPF_JMP_IMM(BPF_JNE, BPF_REG_7, htobe16(protocol), 0), diff --git a/src/core/dbus-service.c b/src/core/dbus-service.c index 455114d8cad..ea82a665a63 100644 --- a/src/core/dbus-service.c +++ b/src/core/dbus-service.c @@ -266,7 +266,7 @@ int bus_service_method_dump_file_descriptor_store(sd_bus_message *message, void continue; } - /* glibc implies O_LARGEFILE everywhere on 64bit off_t builds, but forgets to hide it away on + /* glibc implies O_LARGEFILE everywhere on 64-bit off_t builds, but forgets to hide it away on * F_GETFL, but provides no definition to check for that. Let's mask the flag away manually, * to not confuse clients. */ flags &= ~RAW_O_LARGEFILE; @@ -307,7 +307,7 @@ static int property_get_size_as_uint32( size_t *value = ASSERT_PTR(userdata); uint32_t sz = *value >= UINT32_MAX ? UINT32_MAX : (uint32_t) *value; - /* Returns a size_t as a D-Bus "u" type, i.e. as 32bit value, even if size_t is 64bit. We'll saturate if it doesn't fit. */ + /* Returns a size_t as a D-Bus "u" type, i.e. as 32-bit value, even if size_t is 64-bit. We'll saturate if it doesn't fit. */ return sd_bus_message_append_basic(reply, 'u', &sz); } diff --git a/src/core/manager.c b/src/core/manager.c index 35b90e21594..f4591002944 100644 --- a/src/core/manager.c +++ b/src/core/manager.c @@ -3272,7 +3272,7 @@ int manager_load_unit_from_dbus_path(Manager *m, const char *s, sd_bus_error *e, if (r < 0) return r; - /* Permit addressing units by invocation ID: if the passed bus path is suffixed by a 128bit ID then + /* Permit addressing units by invocation ID: if the passed bus path is suffixed by a 128-bit ID then * we use it as invocation ID. */ r = sd_id128_from_string(n, &invocation_id); if (r >= 0) { @@ -4497,7 +4497,7 @@ static void manager_unref_uid_internal( /* A generic implementation, covering both manager_unref_uid() and manager_unref_gid(), under the * assumption that uid_t and gid_t are actually defined the same way, with the same validity rules. * - * We store a hashmap where the key is the UID/GID and the value is a 32bit reference counter, whose + * We store a hashmap where the key is the UID/GID and the value is a 32-bit reference counter, whose * highest bit is used as flag for marking UIDs/GIDs whose IPC objects to remove when the last * reference to the UID/GID is dropped. The flag is set to on, once at least one reference from a * unit where RemoveIPC= is set is added on a UID/GID. It is reset when the UID's/GID's reference diff --git a/src/coredump/coredump.c b/src/coredump/coredump.c index 39b777b5358..24b019294bb 100644 --- a/src/coredump/coredump.c +++ b/src/coredump/coredump.c @@ -52,7 +52,7 @@ #include "uid-alloc-range.h" #include "user-util.h" -/* The maximum size up to which we process coredumps. We use 1G on 32bit systems, and 32G on 64bit systems */ +/* The maximum size up to which we process coredumps. We use 1G on 32-bit systems, and 32G on 64-bit systems */ #if __SIZEOF_POINTER__ == 4 #define PROCESS_SIZE_MAX ((uint64_t) (1LLU*1024LLU*1024LLU*1024LLU)) #elif __SIZEOF_POINTER__ == 8 diff --git a/src/dissect/dissect.c b/src/dissect/dissect.c index 25bdd68cd20..d2a95eaf681 100644 --- a/src/dissect/dissect.c +++ b/src/dissect/dissect.c @@ -394,7 +394,7 @@ static int parse_argv(int argc, char *argv[]) { return log_error_errno(r, "Failed to parse root hash '%s': %m", optarg); if (l < sizeof(sd_id128_t)) return log_error_errno(SYNTHETIC_ERRNO(EINVAL), - "Root hash must be at least 128bit long: %s", optarg); + "Root hash must be at least 128-bit long: %s", optarg); free_and_replace(arg_verity_settings.root_hash, p); arg_verity_settings.root_hash_size = l; diff --git a/src/home/homework-fscrypt.c b/src/home/homework-fscrypt.c index 8b7fdda5b1a..1b695309c0b 100644 --- a/src/home/homework-fscrypt.c +++ b/src/home/homework-fscrypt.c @@ -222,7 +222,7 @@ static int fscrypt_setup( char **list; int n; - /* Check if this xattr has the format 'trusted.fscrypt_slot' where '' is a 32bit unsigned integer */ + /* Check if this xattr has the format 'trusted.fscrypt_slot' where '' is a 32-bit unsigned integer */ nr = startswith(xa, "trusted.fscrypt_slot"); if (!nr) continue; @@ -655,7 +655,7 @@ int home_passwd_fscrypt( const char *nr; uint32_t z; - /* Check if this xattr has the format 'trusted.fscrypt_slot' where '' is a 32bit unsigned integer */ + /* Check if this xattr has the format 'trusted.fscrypt_slot' where '' is a 32-bit unsigned integer */ nr = startswith(xa, "trusted.fscrypt_slot"); if (!nr) continue; diff --git a/src/home/homework-mount.c b/src/home/homework-mount.c index 130617a157f..28f09b939fe 100644 --- a/src/home/homework-mount.c +++ b/src/home/homework-mount.c @@ -226,7 +226,7 @@ static int make_home_userns(uid_t stored_uid, uid_t exposed_uid) { return log_oom(); /* Leave everything else unmapped, starting from UID_NOBODY itself. Specifically, this means the - * whole space outside of 16bit remains unmapped */ + * whole space outside of 16-bit remains unmapped */ log_debug("Creating userns with mapping:\n%s", text); diff --git a/src/id128/id128.c b/src/id128/id128.c index 53a24348d5c..a8c5c9ac6cf 100644 --- a/src/id128/id128.c +++ b/src/id128/id128.c @@ -156,7 +156,7 @@ static int help(void) { return log_oom(); printf("%s [OPTIONS...] COMMAND\n\n" - "%sGenerate and print 128bit identifiers.%s\n" + "%sGenerate and print 128-bit identifiers.%s\n" "\nCommands:\n" " new Generate a new ID\n" " machine-id Print the ID of current machine\n" diff --git a/src/libsystemd-network/ndisc-router.c b/src/libsystemd-network/ndisc-router.c index e4cbf714b97..36deba757b5 100644 --- a/src/libsystemd-network/ndisc-router.c +++ b/src/libsystemd-network/ndisc-router.c @@ -81,7 +81,7 @@ int ndisc_router_parse(sd_ndisc *nd, sd_ndisc_router *rt) { return log_ndisc_errno(nd, SYNTHETIC_ERRNO(EBADMSG), "Too small to be a router advertisement, ignoring."); - /* Router advertisement packets are neatly aligned to 64bit boundaries, hence we can access them directly */ + /* Router advertisement packets are neatly aligned to 64-bit boundaries, hence we can access them directly */ a = NDISC_ROUTER_RAW(rt); if (a->nd_ra_type != ND_ROUTER_ADVERT) @@ -93,7 +93,7 @@ int ndisc_router_parse(sd_ndisc *nd, sd_ndisc_router *rt) { "Received ND packet with wrong RA code, ignoring."); rt->hop_limit = a->nd_ra_curhoplimit; - rt->flags = a->nd_ra_flags_reserved; /* the first 8bit */ + rt->flags = a->nd_ra_flags_reserved; /* the first 8 bits */ rt->lifetime = be16toh(a->nd_ra_router_lifetime); rt->preference = (rt->flags >> 3) & 3; diff --git a/src/libsystemd/sd-bus/bus-creds.c b/src/libsystemd/sd-bus/bus-creds.c index a06f6e659ac..d2513f1f738 100644 --- a/src/libsystemd/sd-bus/bus-creds.c +++ b/src/libsystemd/sd-bus/bus-creds.c @@ -661,8 +661,8 @@ static int has_cap(sd_bus_creds *c, size_t offset, int capability) { if ((unsigned) capability > lc) return 0; - /* If the last cap is 63, then there are 64 caps defined, and we need 2 entries à 32bit hence. * - * If the last cap is 64, then there are 65 caps defined, and we need 3 entries à 32bit hence. */ + /* If the last cap is 63, then there are 64 caps defined, and we need 2 entries à 32-bit hence. * + * If the last cap is 64, then there are 65 caps defined, and we need 3 entries à 32-bit hence. */ sz = DIV_ROUND_UP(lc+1, 32LU); return !!(c->capability[offset * sz + CAP_TO_INDEX((uint32_t) capability)] & CAP_TO_MASK_CORRECTED((uint32_t) capability)); diff --git a/src/libsystemd/sd-bus/bus-message.c b/src/libsystemd/sd-bus/bus-message.c index e41ce9c1c1b..3cf1419a14b 100644 --- a/src/libsystemd/sd-bus/bus-message.c +++ b/src/libsystemd/sd-bus/bus-message.c @@ -225,11 +225,11 @@ static int message_append_field_string( assert(m); - /* dbus only allows 8bit header field ids */ + /* dbus only allows 8-bit header field ids */ if (h > 0xFF) return -EINVAL; - /* dbus doesn't allow strings over 32bit */ + /* dbus doesn't allow strings over 32-bit */ l = strlen(s); if (l > UINT32_MAX) return -EINVAL; @@ -266,11 +266,11 @@ static int message_append_field_signature( assert(m); - /* dbus only allows 8bit header field ids */ + /* dbus only allows 8-bit header field ids */ if (h > 0xFF) return -EINVAL; - /* dbus doesn't allow signatures over 8bit */ + /* dbus doesn't allow signatures over 8-bit */ l = strlen(s); if (l > SD_BUS_MAXIMUM_SIGNATURE_LENGTH) return -EINVAL; @@ -300,7 +300,7 @@ static int message_append_field_uint32(sd_bus_message *m, uint64_t h, uint32_t x assert(m); - /* dbus only allows 8bit header field ids */ + /* dbus only allows 8-bit header field ids */ if (h > 0xFF) return -EINVAL; @@ -322,7 +322,7 @@ static int message_append_field_uint32(sd_bus_message *m, uint64_t h, uint32_t x static int message_append_reply_cookie(sd_bus_message *m, uint64_t cookie) { assert(m); - /* 64bit cookies are not supported */ + /* 64-bit cookies are not supported */ if (cookie > UINT32_MAX) return -EOPNOTSUPP; @@ -1203,7 +1203,7 @@ static void *message_extend_body( padding = start_body - m->body_size; added = padding + sz; - /* Check for 32bit overflows */ + /* Check for 32-bit overflows */ if (end_body < start_body || end_body > UINT32_MAX) { m->poisoned = true; return NULL; diff --git a/src/libsystemd/sd-bus/bus-socket.c b/src/libsystemd/sd-bus/bus-socket.c index e4e19972649..af16c647456 100644 --- a/src/libsystemd/sd-bus/bus-socket.c +++ b/src/libsystemd/sd-bus/bus-socket.c @@ -918,7 +918,7 @@ static int bind_description(sd_bus *b, int fd, int family) { (void) sd_bus_get_description(b, &d); /* Generate a recognizable source address in the abstract namespace. We'll include: - * - a random 64bit value (to avoid collisions) + * - a random 64-bit value (to avoid collisions) * - our "comm" process name (suppressed if contains "/" to avoid parsing issues) * - the description string of the bus connection. */ (void) get_process_comm(0, &comm); diff --git a/src/libsystemd/sd-bus/sd-bus.c b/src/libsystemd/sd-bus/sd-bus.c index d399509816d..2758309ac56 100644 --- a/src/libsystemd/sd-bus/sd-bus.c +++ b/src/libsystemd/sd-bus/sd-bus.c @@ -1902,7 +1902,7 @@ _public_ int sd_bus_get_bus_id(sd_bus *bus, sd_id128_t *id) { static uint64_t cookie_inc(uint64_t cookie) { - /* Stay within the 32bit range, since classic D-Bus can't deal with more */ + /* Stay within the 32-bit range, since classic D-Bus can't deal with more */ if (cookie >= UINT32_MAX) return COOKIE_CYCLED; /* Don't go back to zero, but use the highest bit for checking * whether we are looping. */ diff --git a/src/libsystemd/sd-id128/id128-util.c b/src/libsystemd/sd-id128/id128-util.c index edadd86eaa0..ee9e91c58d5 100644 --- a/src/libsystemd/sd-id128/id128-util.c +++ b/src/libsystemd/sd-id128/id128-util.c @@ -21,7 +21,7 @@ bool id128_is_valid(const char *s) { l = strlen(s); if (l == SD_ID128_STRING_MAX - 1) - /* Plain formatted 128bit hex string */ + /* Plain formatted 128-bit hex string */ return in_charset(s, HEXDIGITS); if (l == SD_ID128_UUID_STRING_MAX - 1) { @@ -49,7 +49,7 @@ int id128_read_fd(int fd, Id128Flag f, sd_id128_t *ret) { assert(fd >= 0); - /* Reads an 128bit ID from a file, which may either be in plain format (32 hex digits), or in UUID format, both + /* Reads an 128-bit ID from a file, which may either be in plain format (32 hex digits), or in UUID format, both * optionally followed by a newline and nothing else. ID files should really be newline terminated, but if they * aren't that's OK too, following the rule of "Be conservative in what you send, be liberal in what you * accept". diff --git a/src/libsystemd/sd-journal/journal-file.c b/src/libsystemd/sd-journal/journal-file.c index 2174beb1f7a..3af463eb04e 100644 --- a/src/libsystemd/sd-journal/journal-file.c +++ b/src/libsystemd/sd-journal/journal-file.c @@ -1062,7 +1062,7 @@ int journal_file_move_to_object(JournalFile *f, ObjectType type, uint64_t offset /* Objects may only be located at multiple of 64 bit */ if (!VALID64(offset)) return log_debug_errno(SYNTHETIC_ERRNO(EBADMSG), - "Attempt to move to %s object at non-64bit boundary: %" PRIu64, + "Attempt to move to %s object at non-64-bit boundary: %" PRIu64, journal_object_type_to_string(type), offset); @@ -1109,7 +1109,7 @@ int journal_file_read_object_header(JournalFile *f, ObjectType type, uint64_t of /* Objects may only be located at multiple of 64 bit */ if (!VALID64(offset)) return log_debug_errno(SYNTHETIC_ERRNO(EBADMSG), - "Attempt to read %s object at non-64bit boundary: %" PRIu64, + "Attempt to read %s object at non-64-bit boundary: %" PRIu64, journal_object_type_to_string(type), offset); /* Object may not be located in the file header */ @@ -1880,7 +1880,7 @@ static int maybe_decompress_payload( assert(f); - /* We can't read objects larger than 4G on a 32bit machine */ + /* We can't read objects larger than 4G on a 32-bit machine */ if ((uint64_t) (size_t) size != size) return -E2BIG; diff --git a/src/libsystemd/sd-journal/journal-send.c b/src/libsystemd/sd-journal/journal-send.c index da035a3a783..4380a21f7d0 100644 --- a/src/libsystemd/sd-journal/journal-send.c +++ b/src/libsystemd/sd-journal/journal-send.c @@ -261,7 +261,7 @@ _public_ int sd_journal_sendv(const struct iovec *iov, int n) { /* Already includes a newline? Bummer, then * let's write the variable name, then a - * newline, then the size (64bit LE), followed + * newline, then the size (64-bit LE), followed * by the data and a final newline */ w[j++] = IOVEC_MAKE(iov[i].iov_base, c - (char*) iov[i].iov_base); diff --git a/src/libsystemd/sd-journal/sd-journal.c b/src/libsystemd/sd-journal/sd-journal.c index 87e24288641..0124900517c 100644 --- a/src/libsystemd/sd-journal/sd-journal.c +++ b/src/libsystemd/sd-journal/sd-journal.c @@ -1647,7 +1647,7 @@ static bool dirent_is_journal_subdir(const struct dirent *de) { assert(de); /* returns true if the specified directory entry looks like a directory that might contain journal - * files we might be interested in, i.e. is either a 128bit ID or a 128bit ID suffixed by a + * files we might be interested in, i.e. is either a 128-bit ID or a 128-bit ID suffixed by a * namespace. */ if (!IN_SET(de->d_type, DT_DIR, DT_LNK, DT_UNKNOWN)) diff --git a/src/nspawn/nspawn-network.c b/src/nspawn/nspawn-network.c index c2ba00c4381..89b50026db3 100644 --- a/src/nspawn/nspawn-network.c +++ b/src/nspawn/nspawn-network.c @@ -211,10 +211,10 @@ static int shorten_ifname(char *ifname) { if (naming_scheme_has(NAMING_NSPAWN_LONG_HASH)) { uint64_t h; - /* Calculate 64bit hash value */ + /* Calculate 64-bit hash value */ h = siphash24(ifname, strlen(ifname), SHORTEN_IFNAME_HASH_KEY.bytes); - /* Set the final four bytes (i.e. 32bit) to the lower 24bit of the hash, encoded in url-safe base64 */ + /* Set the final four bytes (i.e. 32-bit) to the lower 24bit of the hash, encoded in url-safe base64 */ memcpy(new_ifname, ifname, IFNAMSIZ - 5); new_ifname[IFNAMSIZ - 5] = urlsafe_base64char(h >> 18); new_ifname[IFNAMSIZ - 4] = urlsafe_base64char(h >> 12); diff --git a/src/nspawn/nspawn-patch-uid.c b/src/nspawn/nspawn-patch-uid.c index 21a17073127..66663adc2b9 100644 --- a/src/nspawn/nspawn-patch-uid.c +++ b/src/nspawn/nspawn-patch-uid.c @@ -408,7 +408,7 @@ static int fd_patch_uid_internal(int fd, bool donate_fd, uid_t shift, uid_t rang /* Recursively adjusts the UID/GIDs of all files of a directory tree. This is used to automatically fix up an * OS tree to the used user namespace UID range. Note that this automatic adjustment only works for UID ranges - * following the concept that the upper 16bit of a UID identify the container, and the lower 16bit are the actual + * following the concept that the upper 16-bit of a UID identify the container, and the lower 16-bit are the actual * UID within the container. */ if ((shift & 0xFFFF) != 0) { @@ -423,7 +423,7 @@ static int fd_patch_uid_internal(int fd, bool donate_fd, uid_t shift, uid_t rang } if (range != 0x10000) { - /* We only support containers with 16bit UID ranges for the patching logic */ + /* We only support containers with 16-bit UID ranges for the patching logic */ r = -EOPNOTSUPP; goto finish; } @@ -440,7 +440,7 @@ static int fd_patch_uid_internal(int fd, bool donate_fd, uid_t shift, uid_t rang } /* Try to detect if the range is already right. Of course, this a pretty drastic optimization, as we assume - * that if the top-level dir has the right upper 16bit assigned, then everything below will have too... */ + * that if the top-level dir has the right upper 16-bit assigned, then everything below will have too... */ if (((uint32_t) (st.st_uid ^ shift) >> 16) == 0) return 0; diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c index 4fdb5e9fd78..e170958fc5c 100644 --- a/src/nspawn/nspawn.c +++ b/src/nspawn/nspawn.c @@ -1393,7 +1393,7 @@ static int parse_argv(int argc, char *argv[]) { if (r < 0) return log_error_errno(r, "Failed to parse root hash: %s", optarg); if (l < sizeof(sd_id128_t)) - return log_error_errno(SYNTHETIC_ERRNO(EINVAL), "Root hash must be at least 128bit long: %s", optarg); + return log_error_errno(SYNTHETIC_ERRNO(EINVAL), "Root hash must be at least 128-bit long: %s", optarg); free_and_replace(arg_verity_settings.root_hash, k); arg_verity_settings.root_hash_size = l; diff --git a/src/partition/repart.c b/src/partition/repart.c index 7540291d44f..c7791178b47 100644 --- a/src/partition/repart.c +++ b/src/partition/repart.c @@ -850,7 +850,7 @@ static int context_sum_weights(Context *context, FreeArea *a, uint64_t *ret) { return 0; overflow_sum: - return log_error_errno(SYNTHETIC_ERRNO(EOVERFLOW), "Combined weight of partition exceeds unsigned 64bit range, refusing."); + return log_error_errno(SYNTHETIC_ERRNO(EOVERFLOW), "Combined weight of partition exceeds unsigned 64-bit range, refusing."); } static uint64_t scale_by_weight(uint64_t value, uint64_t weight, uint64_t weight_sum) { @@ -1590,7 +1590,7 @@ static int config_parse_uuid( r = sd_id128_from_string(rvalue, &partition->new_uuid); if (r < 0) { - log_syntax(unit, LOG_WARNING, filename, line, r, "Failed to parse 128bit ID/UUID, ignoring: %s", rvalue); + log_syntax(unit, LOG_WARNING, filename, line, r, "Failed to parse 128-bit ID/UUID, ignoring: %s", rvalue); return 0; } @@ -5957,7 +5957,7 @@ static int help(void) { " Enroll signed TPM2 PCR policy against PEM public key\n" " --tpm2-public-key-pcrs=PCR1+PCR2+PCR3+…\n" " Enroll signed TPM2 PCR policy for specified TPM2 PCRs\n" - " --seed=UUID 128bit seed UUID to derive all UUIDs from\n" + " --seed=UUID 128-bit seed UUID to derive all UUIDs from\n" " --size=BYTES Grow loopback file to specified size\n" " --json=pretty|short|off\n" " Generate JSON output\n" diff --git a/src/resolve/resolved-dns-packet.h b/src/resolve/resolved-dns-packet.h index e4d3e94c683..a6af44c6ec0 100644 --- a/src/resolve/resolved-dns-packet.h +++ b/src/resolve/resolved-dns-packet.h @@ -44,7 +44,7 @@ assert_cc(sizeof(struct iphdr) == 20); assert_cc(sizeof(struct udphdr) == 8); assert_cc(sizeof(DnsPacketHeader) == 12); -/* The various DNS protocols deviate in how large a packet can grow, but the TCP transport has a 16bit size +/* The various DNS protocols deviate in how large a packet can grow, but the TCP transport has a 16-bit size * field, hence that appears to be the absolute maximum. */ #define DNS_PACKET_SIZE_MAX 0xFFFFu diff --git a/src/shared/bus-get-properties.h b/src/shared/bus-get-properties.h index 44cd584bdcb..4c351265028 100644 --- a/src/shared/bus-get-properties.h +++ b/src/shared/bus-get-properties.h @@ -19,7 +19,7 @@ assert_cc(sizeof(int) == sizeof(int32_t)); assert_cc(sizeof(unsigned) == sizeof(uint32_t)); #define bus_property_get_unsigned ((sd_bus_property_get_t) NULL) -/* On 64bit machines we can use the default serializer for size_t and +/* On 64-bit machines we can use the default serializer for size_t and * friends, otherwise we need to cast this manually */ #if __SIZEOF_SIZE_T__ == 8 #define bus_property_get_size ((sd_bus_property_get_t) NULL) @@ -36,7 +36,7 @@ int bus_property_get_ulong(sd_bus *bus, const char *path, const char *interface, #endif /* uid_t and friends on Linux 32 bit. This means we can just use the - * default serializer for 32bit unsigned, for serializing it, and map + * default serializer for 32-bit unsigned, for serializing it, and map * it to NULL here */ assert_cc(sizeof(uid_t) == sizeof(uint32_t)); #define bus_property_get_uid ((sd_bus_property_get_t) NULL) diff --git a/src/shared/conf-parser.c b/src/shared/conf-parser.c index 10bef002b01..ec4b53b2e8e 100644 --- a/src/shared/conf-parser.c +++ b/src/shared/conf-parser.c @@ -953,12 +953,12 @@ int config_parse_id128( r = sd_id128_from_string(rvalue, &t); if (r < 0) { - log_syntax(unit, LOG_WARNING, filename, line, r, "Failed to parse 128bit ID/UUID, ignoring: %s", rvalue); + log_syntax(unit, LOG_WARNING, filename, line, r, "Failed to parse 128-bit ID/UUID, ignoring: %s", rvalue); return 0; } if (sd_id128_is_null(t)) { - log_syntax(unit, LOG_WARNING, filename, line, 0, "128bit ID/UUID is all 0, ignoring: %s", rvalue); + log_syntax(unit, LOG_WARNING, filename, line, 0, "128-bit ID/UUID is all 0, ignoring: %s", rvalue); return 0; } diff --git a/src/shared/dissect-image.c b/src/shared/dissect-image.c index 52a1b559803..44e77f93282 100644 --- a/src/shared/dissect-image.c +++ b/src/shared/dissect-image.c @@ -711,8 +711,8 @@ static int dissect_image( sd_id128_t fsuuid, vuuid; /* If a root hash is supplied, then we use the root partition that has a UUID that match the - * first 128bit of the root hash. And we use the verity partition that has a UUID that match - * the final 128bit. */ + * first 128-bit of the root hash. And we use the verity partition that has a UUID that match + * the final 128-bit. */ if (verity->root_hash_size < sizeof(sd_id128_t)) return -EINVAL; diff --git a/src/shared/dns-domain.c b/src/shared/dns-domain.c index 620b1565633..6b948c6b5e7 100644 --- a/src/shared/dns-domain.c +++ b/src/shared/dns-domain.c @@ -85,12 +85,9 @@ int dns_label_unescape(const char **name, char *dest, size_t sz, DNSLabelFlags f ((unsigned) (n[1] - '0') * 10) + ((unsigned) (n[2] - '0')); - /* Don't allow anything that doesn't - * fit in 8bit. Note that we do allow - * control characters, as some servers - * (e.g. cloudflare) are happy to - * generate labels with them - * inside. */ + /* Don't allow anything that doesn't fit in 8 bits. Note that we do allow + * control characters, as some servers (e.g. cloudflare) are happy to + * generate labels with them inside. */ if (k > 255) return -EINVAL; @@ -297,7 +294,7 @@ int dns_label_escape_new(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) { _cleanup_free_ uint32_t *input = NULL; size_t input_size, l; - bool contains_8bit = false; + bool contains_8_bit = false; char buffer[DNS_LABEL_MAX+1]; int r; @@ -315,9 +312,9 @@ int dns_label_apply_idna(const char *encoded, size_t encoded_size, char *decoded for (const char *p = encoded; p < encoded + encoded_size; p++) if ((uint8_t) *p > 127) - contains_8bit = true; + contains_8_bit = true; - if (!contains_8bit) { + if (!contains_8_bit) { if (encoded_size > DNS_LABEL_MAX) return -EINVAL; diff --git a/src/shared/json-internal.h b/src/shared/json-internal.h index 778cc51e756..a94befa753e 100644 --- a/src/shared/json-internal.h +++ b/src/shared/json-internal.h @@ -9,7 +9,7 @@ * interface with this. */ typedef union JsonValue { - /* Encodes a simple value. This structure is generally 8 bytes wide (as double is 64bit). */ + /* Encodes a simple value. This structure is generally 8 bytes wide (as double is 64-bit). */ bool boolean; double real; int64_t integer; diff --git a/src/shared/json.h b/src/shared/json.h index 1356d0827bd..3f86222f2ab 100644 --- a/src/shared/json.h +++ b/src/shared/json.h @@ -21,7 +21,7 @@ In case you wonder why we have our own JSON implementation, here are a couple of reasons why this implementation has benefits over various other implementations: - - We need support for 64bit signed and unsigned integers, i.e. the full 64,5bit range of -9223372036854775808…18446744073709551615 + - We need support for 64-bit signed and unsigned integers, i.e. the full 64,5bit range of -9223372036854775808…18446744073709551615 - All our variants are immutable after creation - Special values such as true, false, zero, null, empty strings, empty array, empty objects require zero dynamic memory - Progressive parsing diff --git a/src/shared/linux/bpf.h b/src/shared/linux/bpf.h index a667908d208..9f8af5eade5 100644 --- a/src/shared/linux/bpf.h +++ b/src/shared/linux/bpf.h @@ -3972,7 +3972,7 @@ union bpf_attr { * * u64 bpf_jiffies64(void) * Description - * Obtain the 64bit jiffies + * Obtain the 64-bit jiffies * Return * The 64 bit jiffies * diff --git a/src/shared/linux/ethtool.h b/src/shared/linux/ethtool.h index 1458de36273..3d1da515c08 100644 --- a/src/shared/linux/ethtool.h +++ b/src/shared/linux/ethtool.h @@ -1093,7 +1093,7 @@ struct ethtool_rx_flow_spec { /* How rings are laid out when accessing virtual functions or * offloaded queues is device specific. To allow users to do flow * steering and specify these queues the ring cookie is partitioned - * into a 32bit queue index with an 8 bit virtual function id. + * into a 32-bit queue index with an 8 bit virtual function id. * This also leaves the 3bytes for further specifiers. It is possible * future devices may support more than 256 virtual functions if * devices start supporting PCIe w/ARI. However at the moment I diff --git a/src/shared/quota-util.h b/src/shared/quota-util.h index fc395221ae6..14a390ebe41 100644 --- a/src/shared/quota-util.h +++ b/src/shared/quota-util.h @@ -6,9 +6,9 @@ #include /* Wrapper around the QCMD() macro of linux/quota.h that removes some undefined behaviour. A typical quota - * command such as QCMD(Q_GETQUOTA, USRQUOTA) cannot be resolved on platforms where "int" is 32bit, as it is + * command such as QCMD(Q_GETQUOTA, USRQUOTA) cannot be resolved on platforms where "int" is 32-bit, as it is * larger than INT_MAX. Yikes, because that are basically all platforms Linux supports. Let's add a wrapper - * that explicitly takes its arguments as unsigned 32bit, and then converts the shift result explicitly to + * that explicitly takes its arguments as unsigned 32-bit, and then converts the shift result explicitly to * int, acknowledging the undefined behaviour of the kernel headers. This doesn't remove the undefined * behaviour, but it stops ubsan from complaining about it. */ static inline int QCMD_FIXED(uint32_t cmd, uint32_t type) { diff --git a/src/shared/varlink.h b/src/shared/varlink.h index a94f5a7729e..0984222c96b 100644 --- a/src/shared/varlink.h +++ b/src/shared/varlink.h @@ -13,7 +13,7 @@ * to write our own implementation relatively easily. However, the main reasons are these: * * • We want to use our own JSON subsystem, with all the benefits that brings (i.e. accurate unsigned+signed - * 64bit integers, full fuzzing, logging during parsing and so on). If we'd want to use that with + * 64-bit integers, full fuzzing, logging during parsing and so on). If we'd want to use that with * libvarlink we'd have to serialize and deserialize all the time from its own representation which is * inefficient and nasty. * diff --git a/src/systemd/_sd-common.h b/src/systemd/_sd-common.h index 6f657c22543..d4381d90f4a 100644 --- a/src/systemd/_sd-common.h +++ b/src/systemd/_sd-common.h @@ -99,7 +99,7 @@ typedef void (*_sd_destroy_t)(void *userdata); } \ struct _sd_useless_struct_to_allow_trailing_semicolon_ -/* The following macro should be used in all public enums, to force 64bit wideness on them, so that we can +/* The following macro should be used in all public enums, to force 64-bit wideness on them, so that we can * freely extend them later on, without breaking compatibility. */ #define _SD_ENUM_FORCE_S64(id) \ _SD_##id##_INT64_MIN = INT64_MIN, \ diff --git a/src/sysupdate/sysupdate-partition.c b/src/sysupdate/sysupdate-partition.c index bd0486d99ed..8f334696637 100644 --- a/src/sysupdate/sysupdate-partition.c +++ b/src/sysupdate/sysupdate-partition.c @@ -64,7 +64,7 @@ static int fdisk_partition_get_attrs_as_uint64( continue; } - if (u >= sizeof(flags)*8) { /* partition flags on GPT are 64bit. Let's ignore any further + if (u >= sizeof(flags)*8) { /* partition flags on GPT are 64-bit. Let's ignore any further bits should libfdisk report them */ log_debug("Partition flag above bit 63 (%s), ignoring.", word); continue; diff --git a/src/test/test-capability.c b/src/test/test-capability.c index e989065f492..bfdba4f2942 100644 --- a/src/test/test-capability.c +++ b/src/test/test-capability.c @@ -229,7 +229,7 @@ static void test_apply_ambient_caps(void) { assert_se(prctl(PR_CAP_AMBIENT, PR_CAP_AMBIENT_IS_SET, CAP_CHOWN, 0, 0) == 0); } -static void test_ensure_cap_64bit(void) { +static void test_ensure_cap_64_bit(void) { _cleanup_free_ char *content = NULL; unsigned long p = 0; int r; @@ -241,7 +241,7 @@ static void test_ensure_cap_64bit(void) { assert_se(safe_atolu(content, &p) >= 0); - /* If caps don't fit into 64bit anymore, we have a problem, fail the test. */ + /* If caps don't fit into 64-bit anymore, we have a problem, fail the test. */ assert_se(p <= 63); /* Also check for the header definition */ @@ -303,7 +303,7 @@ int main(int argc, char *argv[]) { test_setup_logging(LOG_DEBUG); - test_ensure_cap_64bit(); + test_ensure_cap_64_bit(); test_last_cap_file(); test_last_cap_probe(); diff --git a/src/test/test-devnum-util.c b/src/test/test-devnum-util.c index 66f4ac91496..2068e351b9f 100644 --- a/src/test/test-devnum-util.c +++ b/src/test/test-devnum-util.c @@ -25,7 +25,7 @@ TEST(parse_devnum) { } TEST(device_major_minor_valid) { - /* on glibc dev_t is 64bit, even though in the kernel it is only 32bit */ + /* on glibc dev_t is 64-bit, even though in the kernel it is only 32-bit */ assert_cc(sizeof(dev_t) == sizeof(uint64_t)); assert_se(DEVICE_MAJOR_VALID(0U)); diff --git a/src/timesync/timesyncd-manager.c b/src/timesync/timesyncd-manager.c index 07f66623a75..74ac20ac7cc 100644 --- a/src/timesync/timesyncd-manager.c +++ b/src/timesync/timesyncd-manager.c @@ -79,7 +79,7 @@ static double ts_to_d(const struct timespec *ts) { } static uint32_t graceful_add_offset_1900_1970(time_t t) { - /* Adds OFFSET_1900_1970 to t and returns it as 32bit value. This is handles overflows + /* Adds OFFSET_1900_1970 to t and returns it as 32-bit value. This is handles overflows * gracefully in a deterministic and well-defined way by cutting off the top bits. */ uint64_t a = (uint64_t) t + OFFSET_1900_1970; return (uint32_t) (a & UINT64_C(0xFFFFFFFF));