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)
This commit is contained in:
committed by
Luca Boccassi
parent
04a645cce5
commit
2832b3f2c9
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user