summaryrefslogtreecommitdiffstats
path: root/src/gpt-auto-generator/gpt-auto-generator.c
diff options
context:
space:
mode:
authorMike Yuan <me@yhndnzj.com>2024-03-11 08:29:41 +0100
committerMike Yuan <me@yhndnzj.com>2024-03-11 08:34:05 +0100
commit622f2dcc71629d9cf2b6b698e90f68022de807fa (patch)
tree326616b95a47389494507a77bc6e59d7f739623c /src/gpt-auto-generator/gpt-auto-generator.c
parentfstab-util: remove unreachable return (diff)
downloadsystemd-622f2dcc71629d9cf2b6b698e90f68022de807fa.tar.xz
systemd-622f2dcc71629d9cf2b6b698e90f68022de807fa.zip
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.
Diffstat (limited to 'src/gpt-auto-generator/gpt-auto-generator.c')
-rw-r--r--src/gpt-auto-generator/gpt-auto-generator.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gpt-auto-generator/gpt-auto-generator.c b/src/gpt-auto-generator/gpt-auto-generator.c
index c42736cd69..e2b0033eb8 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;