From: Mike Yuan Date: Mon, 11 Mar 2024 07:29:41 +0000 (+0800) Subject: gpt-auto: ignore fstab_has_node failure X-Git-Tag: v256-rc1~577^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F31711%2Fhead;p=thirdparty%2Fsystemd.git gpt-auto: ignore fstab_has_node failure After 8a1326581d9b066377f8d9f2d58e1bdfd8b645d0, we always check whether there're mounts under /boot/ or /efi/ first. Let's relax the check for fstab_has_node hence, since on initrd-less systems it might produce wrong results. --- diff --git a/src/gpt-auto-generator/gpt-auto-generator.c b/src/gpt-auto-generator/gpt-auto-generator.c index c42736cd69e..e2b0033eb83 100644 --- a/src/gpt-auto-generator/gpt-auto-generator.c +++ b/src/gpt-auto-generator/gpt-auto-generator.c @@ -533,8 +533,8 @@ static int add_partition_esp(DissectedPartition *p, bool has_xbootldr) { /* Check if there's an existing fstab entry for ESP. If so, we just skip the gpt-auto logic. */ r = fstab_has_node(p->node); if (r < 0) - return log_error_errno(r, - "Failed to check if fstab entry for device '%s' exists: %m", p->node); + log_warning_errno(r, "Failed to check if fstab entry for device '%s' exists, ignoring: %m", + p->node); if (r > 0) return 0;