From 74b45fe43fad02973470fd85de99243d7749ffdb Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Thu, 9 Nov 2023 12:10:11 +0100 Subject: [PATCH 1/2] Set default value for tools tree This allows overriding it from CLI or previous config file if required. --- mkosi.conf.d/10-tools.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mkosi.conf.d/10-tools.conf b/mkosi.conf.d/10-tools.conf index 21bdea58093..9d276d43c41 100644 --- a/mkosi.conf.d/10-tools.conf +++ b/mkosi.conf.d/10-tools.conf @@ -5,4 +5,4 @@ PathExists=!build/ SystemdVersion=<254 [Host] -ToolsTree=default +@ToolsTree=default From 6563aede889b78279242dcad45a0b9d82b27b617 Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Thu, 9 Nov 2023 12:10:53 +0100 Subject: [PATCH 2/2] repart: Fix size round up/round down Currently, we round minimum sizes up and maximum size down, whereas it should be the opposite as the current approach means that if the same size is used for min and max, the min size will end up bigger than the max size after rounding. --- src/partition/repart.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/partition/repart.c b/src/partition/repart.c index 01cfc46f1ce..43f6f4c3af0 100644 --- a/src/partition/repart.c +++ b/src/partition/repart.c @@ -1686,10 +1686,10 @@ static int partition_read_definition(Partition *p, const char *path, const char { "Partition", "Priority", config_parse_int32, 0, &p->priority }, { "Partition", "Weight", config_parse_weight, 0, &p->weight }, { "Partition", "PaddingWeight", config_parse_weight, 0, &p->padding_weight }, - { "Partition", "SizeMinBytes", config_parse_size4096, 1, &p->size_min }, - { "Partition", "SizeMaxBytes", config_parse_size4096, -1, &p->size_max }, - { "Partition", "PaddingMinBytes", config_parse_size4096, 1, &p->padding_min }, - { "Partition", "PaddingMaxBytes", config_parse_size4096, -1, &p->padding_max }, + { "Partition", "SizeMinBytes", config_parse_size4096, -1, &p->size_min }, + { "Partition", "SizeMaxBytes", config_parse_size4096, 1, &p->size_max }, + { "Partition", "PaddingMinBytes", config_parse_size4096, -1, &p->padding_min }, + { "Partition", "PaddingMaxBytes", config_parse_size4096, 1, &p->padding_max }, { "Partition", "FactoryReset", config_parse_bool, 0, &p->factory_reset }, { "Partition", "CopyBlocks", config_parse_copy_blocks, 0, p }, { "Partition", "Format", config_parse_fstype, 0, &p->format },