path: log at debug level when we can't query a variable

This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2020-03-26 17:33:43 +01:00
parent f52b9131e5
commit e342055851
1 changed files with 4 additions and 4 deletions

View File

@ -94,11 +94,11 @@ static int list_homes(void) {
int q;
q = sd_path_lookup(i, arg_suffix, &p);
if (q == -ENXIO)
continue;
if (q < 0) {
log_error_errno(r, "Failed to query %s: %m", path_table[i]);
r = q;
log_full_errno(q == -ENXIO ? LOG_DEBUG : LOG_ERR,
q, "Failed to query %s: %m", path_table[i]);
if (q != -ENXIO)
r = q;
continue;
}