From 2832b3f2c9988097f988d050dc4dfa715cf00619 Mon Sep 17 00:00:00 2001 From: Rodrigo Campos Date: Fri, 2 Oct 2026 16:22:32 +0200 Subject: [PATCH] portable: log the right error when the profile lookup fails find_portable_profile() returns a negative errno and does not set errno, so the two log messages reported a stale or unrelated errno value. (cherry picked from commit 8da05abc9a8c21af85542b0d4d1d5f48a47f738e) --- src/portable/portable.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/portable/portable.c b/src/portable/portable.c index a05e731c04..8f1e7f22cf 100644 --- a/src/portable/portable.c +++ b/src/portable/portable.c @@ -1605,9 +1605,9 @@ static int install_profile_dropin( r = find_portable_profile(scope, profile, m->name, &from); if (r < 0) { if (r != -ENOENT) - return log_debug_errno(errno, "Profile '%s' is not accessible: %m", profile); + return log_debug_errno(r, "Profile '%s' is not accessible: %m", profile); - log_debug_errno(errno, "Skipping link to profile '%s', as it does not exist: %m", profile); + log_debug_errno(r, "Skipping link to profile '%s', as it does not exist: %m", profile); return 0; }