]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
homework: downgrade chattr failure log message 16762/head
authorLennart Poettering <lennart@poettering.net>
Mon, 17 Aug 2020 20:07:55 +0000 (22:07 +0200)
committerLennart Poettering <lennart@poettering.net>
Tue, 18 Aug 2020 10:41:31 +0000 (12:41 +0200)
NOCOW is a btrfs-only thing hence don't log louder than necessary if we
don't have it.

src/home/homework-luks.c

index d97fcbe07a48ace5b7ce99978c58123dad9cad34..1fcf17806e7405ddc1cac96d5e6a557b81f81963 100644 (file)
@@ -2017,7 +2017,8 @@ int home_create_luks(
 
                 r = chattr_fd(image_fd, FS_NOCOW_FL, FS_NOCOW_FL, NULL);
                 if (r < 0)
-                        log_warning_errno(r, "Failed to set file attributes on %s, ignoring: %m", temporary_image_path);
+                        log_full_errno(ERRNO_IS_NOT_SUPPORTED(r) ? LOG_DEBUG : LOG_WARNING, r,
+                                       "Failed to set file attributes on %s, ignoring: %m", temporary_image_path);
 
                 r = home_truncate(h, image_fd, temporary_image_path, host_size);
                 if (r < 0)