gpt-auto: ignore fstab_has_node failure

After 8a1326581d,
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.
This commit is contained in:
Mike Yuan
2024-03-11 15:29:41 +08:00
parent 18f9ecd40c
commit 622f2dcc71

View 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;