]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
nspawn: use ERRNO_IS_NEG_NOT_SUPPORTED() at one more place 34336/head
authorYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 9 Sep 2024 18:44:50 +0000 (03:44 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 9 Sep 2024 19:38:33 +0000 (04:38 +0900)
Follow-up for dc3223919f663b7c8b8d8d1d6072b4487df7709b.
Addresses https://github.com/systemd/systemd/pull/34067#discussion_r1748061156.

Error codes other than ENOSYS may not come here, but if it comes, still
there is nothing we can do here, so let's not log the failure loudly.

src/nspawn/nspawn.c

index c911b3ff2fc798a5353d13c09115e3ad31d3da7c..c0f027fa98e228330998b3d3c6be723924ae4e4e 100644 (file)
@@ -2208,7 +2208,7 @@ static bool should_enable_fuse(void) {
         if (r < 0) {
                 if (ERRNO_IS_NEG_DEVICE_ABSENT(r))
                         log_debug_errno(r, "Disabling FUSE: FUSE appears to be disabled on the host: %m");
-                else if (r == -ENOSYS)
+                else if (ERRNO_IS_NEG_NOT_SUPPORTED(r))
                         log_debug_errno(r, "Disabling FUSE: Kernel does not support the fsopen() family of syscalls: %m");
                 else
                         log_warning_errno(r, "Disabling FUSE: Failed to determine FUSE version: %m");