From: Lennart Poettering Date: Wed, 15 Apr 2020 17:31:33 +0000 (+0200) Subject: homectl: add missing log messages when json_variant_format() fails X-Git-Tag: v246-rc1~45^2~16 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7b8d55b72c11ecaf8b5abef4a0aa9f0dca86c887;p=thirdparty%2Fsystemd.git homectl: add missing log messages when json_variant_format() fails --- diff --git a/src/home/homectl.c b/src/home/homectl.c index 47a506f5e0a..8b91f08edf3 100644 --- a/src/home/homectl.c +++ b/src/home/homectl.c @@ -1423,7 +1423,7 @@ static int create_home(int argc, char *argv[], void *userdata) { r = json_variant_format(hr->json, 0, &formatted); if (r < 0) - return r; + return log_error_errno(r, "Failed to format user record: %m"); r = bus_message_new_method_call(bus, &m, bus_home_mgr, "CreateHome"); if (r < 0) @@ -1631,7 +1631,7 @@ static int update_home(int argc, char *argv[], void *userdata) { r = json_variant_format(hr->json, 0, &formatted); if (r < 0) - return r; + return log_error_errno(r, "Failed to format user record: %m"); (void) sd_bus_message_sensitive(m);