From: Mike Yuan Date: Sun, 8 Dec 2024 19:50:27 +0000 (+0100) Subject: gpt-auto: define loader partition timeout as macro X-Git-Tag: v258-rc1~1885^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=756b6749a26d1b31289e197c02e05c7e5954c8ae;p=thirdparty%2Fsystemd.git gpt-auto: define loader partition timeout as macro --- diff --git a/src/gpt-auto-generator/gpt-auto-generator.c b/src/gpt-auto-generator/gpt-auto-generator.c index 8bb32afb279..150417626c1 100644 --- a/src/gpt-auto-generator/gpt-auto-generator.c +++ b/src/gpt-auto-generator/gpt-auto-generator.c @@ -51,6 +51,8 @@ STATIC_DESTRUCTOR_REGISTER(arg_image_policy, image_policy_freep); STATIC_DESTRUCTOR_REGISTER(arg_root_fstype, freep); STATIC_DESTRUCTOR_REGISTER(arg_root_options, freep); +#define LOADER_PARTITION_IDLE_USEC (120 * USEC_PER_SEC) + static int add_cryptsetup( const char *id, const char *what, @@ -499,7 +501,7 @@ static int add_partition_xbootldr(DissectedPartition *p) { /* growfs= */ false, options, "Boot Loader Partition", - 120 * USEC_PER_SEC); + LOADER_PARTITION_IDLE_USEC); } #if ENABLE_EFI @@ -566,7 +568,7 @@ static int add_partition_esp(DissectedPartition *p, bool has_xbootldr) { /* growfs= */ false, options, "EFI System Partition Automount", - 120 * USEC_PER_SEC); + LOADER_PARTITION_IDLE_USEC); } #else static int add_partition_esp(DissectedPartition *p, bool has_xbootldr) {