summaryrefslogtreecommitdiffstats
path: root/src/sysupdate (follow)
Commit message (Collapse)AuthorAgeFilesLines
* tree-wide: use LIST_CLEAR()David Tardon2023-08-171-4/+1
|
* sysupdate: Use sector size for partition size calculationsMichael A Cassaniti2023-08-151-4/+6
|
* tree-wide: Use fdisk_new_context_at() moreDaan De Meyer2023-08-142-18/+6
|
* sysupdate: Move fdisk partition flags helpers to fdisk-util.cDaan De Meyer2023-08-011-81/+0
|
* meson: move declarations of random-seed, vconsole, and sysupdateYu Watanabe2023-08-011-8/+19
|
* treewide: fix "an" before consonant U soundsJoerg Behrmann2023-07-061-1/+1
| | | | | | The article "a" goes before consonant sounds and "an" goes before vowel sounds. This commit changes an to a for UKI, UDP, UTF-8, URL, UUID, U-Label, UI and USB, since they start with the sound /ˌjuː/.
* tree-wide: "<n>bit" → "<n>-bit"Zbigniew Jędrzejewski-Szmek2023-07-021-1/+1
| | | | In some places, "<n> bits" is used when more appropriate.
* string-util: move version_is_valid() into generic codeLennart Poettering2023-06-205-23/+0
| | | | | | | | While we are at it, replace the sloppy use of filename_is_valid() by the less sloppy filename_part_is_valid() (as added by the preceeding commit), since we don#t want to be too restrictive here. (After all, version strings invalid as standalone filenames might be valid as part of filenames, and hence we should allow them).
* tree-wide: fix a couple of typosFrantisek Sumsal2023-06-151-1/+1
| | | | As reported by Fossies.org.
* sysupdate.d: Add way to drop binaries into $BOOTAdrian Vovk2023-06-033-26/+80
| | | | | | | | | | As described in the BLS, we should place binaries into the XBOOTLDR directory if it is available, otherwise into the ESP. Thus, we might need to put binaries into /boot or into /efi depending on the existence of the XBOOTLDR partition. With this change, we introduce a new PathRelativeTo= config option that makes this functionality possible
* tree-wide: use _cleanup_set_free_ and friendsYu Watanabe2023-05-313-4/+4
| | | | Instead of _cleanup_(set_freep) or so.
* dissect-image: port mount_image_privately_interactively() to use ↵Lennart Poettering2023-05-161-1/+1
| | | | | | | | | | /run/systemd/mount-rootfs/ too Let's use the same common directory as the unit logic uses. This means we have less to clean up, and opens the door to eventually allow unprivileged operation of the mount_image_privately_interactively() logic.
* process-util: make safe_fork() unset $NOTIFY_SOCKETYu Watanabe2023-04-162-2/+0
| | | | | | | | Propagating $NOTIFY_SOCKET is typically dangerous. Let's unset it unless explicitly requested to keep it. Fixes #27288. Replaces #27291.
* image-policy: introduce parse_image_policy_argument() helperYu Watanabe2023-04-131-13/+8
| | | | | | | | | Addresses https://github.com/systemd/systemd/pull/25608/commits/84be0c710d9d562f6d2cf986cc2a8ff4c98a138b#r1060130312, https://github.com/systemd/systemd/pull/25608/commits/84be0c710d9d562f6d2cf986cc2a8ff4c98a138b#r1067927293, and https://github.com/systemd/systemd/pull/25608/commits/84be0c710d9d562f6d2cf986cc2a8ff4c98a138b#r1067926416. Follow-up for 84be0c710d9d562f6d2cf986cc2a8ff4c98a138b.
* tree-wide: hook up image dissection policy logic everywhereLennart Poettering2023-04-051-3/+21
|
* chase-symlinks: Rename chase_symlinks() to chase()Daan De Meyer2023-03-243-7/+7
| | | | | | | | | Chasing symlinks is a core function that's used in a lot of places so it deservers a less verbose names so let's rename it to chase() and chaseat(). We also slightly change the pattern used for the chaseat() helpers so we get chase_and_openat() and similar.
* src: Fixup copy-paste error for terminal_urlify_manMorten Linderud2023-03-101-1/+1
| | | | Signed-off-by: Morten Linderud <morten@linderud.pw>
* tree-wide: use FORK_REARRANGE_STDIO and FORK_CLOSE_ALL_FDSYu Watanabe2023-02-201-9/+5
|
* dissect-image: Return mount point fd if requestedDaan De Meyer2023-02-171-0/+1
|
* meson: Use files() in one more placeJan Janssen2023-01-271-20/+20
|
* sysupdate: fix errno checkFrantisek Sumsal2023-01-251-1/+1
|
* tree-wide: use -EBADF moreYu Watanabe2022-12-201-1/+1
|
* tree-wide: introduce PIPE_EBADF macroYu Watanabe2022-12-201-1/+1
|
* tree-wide: use -EBADF also in pipe initializersZbigniew Jędrzejewski-Szmek2022-12-191-1/+1
| | | | In some places, initialization is dropped when unnecesary.
* tree-wide: use -EBADF for fd initializationZbigniew Jędrzejewski-Szmek2022-12-191-1/+1
| | | | | | | | | | | | | | | | -1 was used everywhere, but -EBADF or -EBADFD started being used in various places. Let's make things consistent in the new style. Note that there are two candidates: EBADF 9 Bad file descriptor EBADFD 77 File descriptor in bad state Since we're initializating the fd, we're just assigning a value that means "no fd yet", so it's just a bad file descriptor, and the first errno fits better. If instead we had a valid file descriptor that became invalid because of some operation or state change, the other errno would fit better. In some places, initialization is dropped if unnecessary.
* fdisk-util: add fdisk_partition_get_type_as_id128() helperLennart Poettering2022-11-291-12/+3
| | | | Let's also add an easy accessor for the other per-partition UUID.
* fdisk-util: add fdisk_partition_get_uuid_as_id128() helperLennart Poettering2022-11-291-7/+3
| | | | Inspired by: #25534
* sysupdate: Support volatile-root for finding the root partitionreuben olinsky2022-11-181-4/+18
| | | | | | | The existing logic can't find the root device in scenarios where the root has been replaced with an overlay. We support looking at "/run/systemd/volatile-root" to find the original root, similar to what systemd-repart and gpt-auto-generator do.
* gpt: Expose GptPartitionType and get rid of SECONDARY/OTHERDaan De Meyer2022-11-154-18/+23
| | | | | | | | | | | | Instead of exposing just the partition type UUID, let's expose the GptPartitionType struct, which has a lot more information available in a much more accessible way. Also, let's get rid of SECONDARY/OTHER in PartitionDesignator. These were only there to support preferred architectures in dissect-image.c, but we can easily handle that by comparing architectures when we decide whether to override a partition. This is done in a new function compare_arch().
* Rename def.h to constants.hZbigniew Jędrzejewski-Szmek2022-11-081-1/+1
| | | | | | The name "def.h" originates from before the rule of "no needless abbreviations" was established. Let's rename the file to clarify that it contains a collection of various semi-related constants.
* basic: rename util.h to logarithm.hZbigniew Jędrzejewski-Szmek2022-11-081-1/+0
| | | | | util.h is now about logarithms only, so we can rename it. Many files included util.h for no apparent reason… Those includes are dropped.
* basic: move version() to build.h+cZbigniew Jędrzejewski-Szmek2022-11-081-0/+1
|
* Merge pull request #24768 from keszybz/table-not-available-2Lennart Poettering2022-09-221-1/+1
|\ | | | | Adjust table n/a text in more places
| * shared/format-table: use enum instead of Table.empty_stringZbigniew Jędrzejewski-Szmek2022-09-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | All users were setting this to some static string (usually "-"), so let's simplify things by not doing strdup, but instead limiting callers to a fixed set of values. In preparation for the next commit, the function is renamed from "empty" to "replacement", because it'll be used for more than empty fields. I didn't do the whole string-table setup, because it's all used internally in one file and this way we can immediately assert if an invalid value is passed in. Some callers were (void)ing the error, others were ignoring it, and others propagating. It's nicer to remove the boilerplate.
* | Merge pull request #24709 from keszybz/partition-table-constantsLennart Poettering2022-09-211-12/+12
|\ \ | | | | | | Expose various GPT UUIDs as public contants and link them up in docs
| * | headers: export partition uuids and flags in new sd-gpt.h fileZbigniew Jędrzejewski-Szmek2022-09-201-12/+12
| |/ | | | | | | | | | | I think those constants are generally useful. It's quite easy to make a mistake when copying things from the docs, so let's make them easy and convenient to access.
* / tree-wide: drop unused reference to DecryptedImageYu Watanabe2022-09-181-17/+7
|/
* tree-wide: use ASSERT_PTR moreDavid Tardon2022-09-131-16/+8
|
* sd-device: rename devpath_from_devnum() -> devname_from_devnum()Yu Watanabe2022-09-021-1/+1
| | | | | | | | In sd-device, `devpath` is a kind of syspath without '/sys' prefix, e.g. /devices/pci0000:00/0000:00:1c.4/0000:3c:00.0/nvme/nvme0/nvme0n1, and `devname` is a path to the device node, e.g. /dev/nvme0n1. Let's use the consistent name for the helper function.
* tree-wide: Fix format specifier warnings for %xJan Janssen2022-08-301-1/+4
| | | | | | Unfortunately, hex output can only be produced with unsigned types. Some cases can be fixed by producing the correct type, but a few simply have to be cast. At least casting makes it explicit.
* tree-wide: use devpath_from_devnum() and device_open_from_devnum()Yu Watanabe2022-08-281-2/+2
| | | | Fixes #24465.
* tree-wide: allow ASCII fallback for … in logsDavid Tardon2022-06-282-8/+9
|
* tree-wide: allow ASCII fallback for → in logsDavid Tardon2022-06-281-2/+6
|
* basic: split out dev_t related calls into new devno-util.[ch]Lennart Poettering2022-04-131-1/+1
| | | | | | | | | | | | | | No actual code changes, just splitting out of some dev_t handling related calls from stat-util.[ch], they are quite a number already, and deserve their own module now I think. Also, try to settle on the name "devnum" as the name for the concept, instead of "devno" or "dev" or "devid". "devnum" is the name exported in udev APIs, hence probably best to stick to that. (this just renames a few symbols to "devum", local variables are left untouched, to make the patch not too invasive) No actual code changes.
* Move path_simplify_and_warn() to new shared/parse-helpers.cZbigniew Jędrzejewski-Szmek2022-04-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a high-level function, and it belongs in libsystemd-shared. This way we don't end up linking a separate copy into various binaries. It would even end up in libsystemd, where it is not needed. (Maybe it'd be removed in some optimization phase, but it's better to not rely on that.) $ grep -l -r -a 'path is not absolute%s' build/ build/libnss_systemd.so.2 build/pam_systemd_home.so build/test-dlopen build/src/basic/libbasic.a.p/path-util.c.o build/src/basic/libbasic.a build/src/shared/libsystemd-shared-249.so build/test-bus-error build/libnss_mymachines.so.2 build/pam_systemd.so build/libnss_resolve.so.2 build/libnss_myhostname.so.2 build/libsystemd.so.0.32.0 build/libudev.so.1.7.2 $ grep -l -r -a 'path is not absolute%s' build/ build/src/shared/libsystemd-shared-251.a.p/parse-helpers.c.o build/src/shared/libsystemd-shared-251.a build/src/shared/libsystemd-shared-251.so No functional change.
* sysupdate: fix error handlingYu Watanabe2022-03-231-1/+1
|
* Drop unused variables to fix buildZbigniew Jędrzejewski-Szmek2022-03-212-6/+2
| | | | This is a merge conflict between #22740 and #20156.
* sysupdate: add new component "sysupdate"Lennart Poettering2022-03-1919-0/+4893