diff options
author | Daan De Meyer <daan.j.demeyer@gmail.com> | 2024-07-02 18:34:39 +0200 |
---|---|---|
committer | Daan De Meyer <daan.j.demeyer@gmail.com> | 2024-07-03 15:45:51 +0200 |
commit | 90a255779d1f8e6697e08e91918df88bb52274ad (patch) | |
tree | fe807f19a13e381319ba1d4fe9d9c3ff7cff04b0 /src/shared | |
parent | mkosi: Copy packages to the build directory as well (diff) | |
download | systemd-90a255779d1f8e6697e08e91918df88bb52274ad.tar.xz systemd-90a255779d1f8e6697e08e91918df88bb52274ad.zip |
repart: Allow overriding fstype per partition designator
$SYSTEMD_REPART_OVERRIDE_FSTYPE is too invasive. Often you want to
override the fstype only for a specific designator, so let's support
that as well.
Diffstat (limited to 'src/shared')
-rw-r--r-- | src/shared/gpt.c | 12 | ||||
-rw-r--r-- | src/shared/gpt.h | 1 |
2 files changed, 13 insertions, 0 deletions
diff --git a/src/shared/gpt.c b/src/shared/gpt.c index d80ee16f2e..fc71ef431b 100644 --- a/src/shared/gpt.c +++ b/src/shared/gpt.c @@ -339,6 +339,18 @@ bool gpt_partition_type_knows_no_auto(GptPartitionType type) { PARTITION_SWAP); } +bool gpt_partition_type_has_filesystem(GptPartitionType type) { + return IN_SET(type.designator, + PARTITION_ROOT, + PARTITION_USR, + PARTITION_HOME, + PARTITION_SRV, + PARTITION_ESP, + PARTITION_XBOOTLDR, + PARTITION_TMP, + PARTITION_VAR); +} + bool gpt_header_has_signature(const GptHeader *p) { assert(p); diff --git a/src/shared/gpt.h b/src/shared/gpt.h index 411749900f..e64ba8439d 100644 --- a/src/shared/gpt.h +++ b/src/shared/gpt.h @@ -72,6 +72,7 @@ const char* gpt_partition_type_mountpoint_nulstr(GptPartitionType type); bool gpt_partition_type_knows_read_only(GptPartitionType type); bool gpt_partition_type_knows_growfs(GptPartitionType type); bool gpt_partition_type_knows_no_auto(GptPartitionType type); +bool gpt_partition_type_has_filesystem(GptPartitionType type); typedef struct { uint8_t partition_type_guid[16]; |