mount-setup: port to logging about mount attempts via mount_*follow_verbose()
authorLennart Poettering <lennart@poettering.net>
Mon, 15 May 2023 09:52:33 +0000 (11:52 +0200)
committerLennart Poettering <lennart@poettering.net>
Tue, 16 May 2023 08:00:04 +0000 (10:00 +0200)
src/shared/mount-setup.c

index a920e8a92a8000a81299f53af01d955b5ad9ad40..e5247bd9282062d5271e64711d959b2c69754f3a 100644 (file)
@@ -186,13 +186,11 @@ static int mount_one(const MountPoint *p, bool relabel) {
                   strna(p->options));
 
         if (FLAGS_SET(p->mode, MNT_FOLLOW_SYMLINK))
-                r = RET_NERRNO(mount(p->what, p->where, p->type, p->flags, p->options));
+                r = mount_follow_verbose(priority, p->what, p->where, p->type, p->flags, p->options);
         else
-                r = mount_nofollow(p->what, p->where, p->type, p->flags, p->options);
-        if (r < 0) {
-                log_full_errno(priority, r, "Failed to mount %s at %s: %m", p->type, p->where);
+                r = mount_nofollow_verbose(priority, p->what, p->where, p->type, p->flags, p->options);
+        if (r < 0)
                 return (p->mode & MNT_FATAL) ? r : 0;
-        }
 
         /* Relabel again, since we now mounted something fresh here */
         if (relabel)