]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
gpt-auto: ignore fstab_has_node failure 31711/head
authorMike Yuan <me@yhndnzj.com>
Mon, 11 Mar 2024 07:29:41 +0000 (15:29 +0800)
committerMike Yuan <me@yhndnzj.com>
Mon, 11 Mar 2024 07:34:05 +0000 (15:34 +0800)
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.

src/gpt-auto-generator/gpt-auto-generator.c

index c42736cd69e63769a9213657a706daec59cd560d..e2b0033eb83edefcba4bcdadb74513b7ccea73ec 100644 (file)
@@ -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;