summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2021-04-14 17:44:47 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2021-04-14 17:45:11 +0200
commit75029e150b47543b5c352298170847d39489c3fc (patch)
tree8ec02193e3bf1af9a5dc4d09a054fe0914f99380 /src
parenta2eb2267e44580446ecad37e7206e729cfd78155 (diff)
downloadsystemd-75029e150b47543b5c352298170847d39489c3fc.tar.gz
Do not try to return 0 from log_debug()
As @yuwata correctly points out, this became broken when log_debug() started returning -EIO. I wanted to preserve this pattern, but it turns out it is not very widely used, and preserving it would make the whole thing, already quite complicated, even more complex. log_debug() is made like log_info() and friends, and returns void.
Diffstat (limited to 'src')
-rw-r--r--src/basic/log.h2
-rw-r--r--src/sleep/sleep.c8
2 files changed, 5 insertions, 5 deletions
diff --git a/src/basic/log.h b/src/basic/log.h
index 9a57fcd0f1..81330166a4 100644
--- a/src/basic/log.h
+++ b/src/basic/log.h
@@ -221,7 +221,7 @@ void log_assert_failed_return(
int log_emergency_level(void);
/* Normal logging */
-#define log_debug(...) log_full_errno_zerook(LOG_DEBUG, 0, __VA_ARGS__)
+#define log_debug(...) log_full(LOG_DEBUG, __VA_ARGS__)
#define log_info(...) log_full(LOG_INFO, __VA_ARGS__)
#define log_notice(...) log_full(LOG_NOTICE, __VA_ARGS__)
#define log_warning(...) log_full(LOG_WARNING, __VA_ARGS__)
diff --git a/src/sleep/sleep.c b/src/sleep/sleep.c
index 262d4cea66..8aeaa1a543 100644
--- a/src/sleep/sleep.c
+++ b/src/sleep/sleep.c
@@ -163,10 +163,10 @@ static int lock_all_homes(void) {
if (!bus_error_is_unknown_service(&error))
return log_error_errno(r, "Failed to lock home directories: %s", bus_error_message(&error, r));
- return log_debug("systemd-homed is not running, locking of home directories skipped.");
- }
-
- return log_debug("Successfully requested locking of all home directories.");
+ log_debug("systemd-homed is not running, locking of home directories skipped.");
+ } else
+ log_debug("Successfully requested locking of all home directories.");
+ return 0;
}
static int execute(char **modes, char **states, const char *action) {