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.
This commit is contained in:
Daan De Meyer
2024-07-03 15:45:51 +02:00
parent 690a85b1d4
commit 90a255779d
4 changed files with 49 additions and 0 deletions
+12
View File
@@ -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);
+1
View File
@@ -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];