diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-10-21 18:47:39 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-10-21 18:47:39 -0400 |
commit | 5d4922bba91c6d60b3b9f38fb29fda0f6ba8338d (patch) | |
tree | 2b94f681c2d3205e40e5c171ebc2565b9ead67a5 | |
parent | cb470532e4d6344b44f4473c46b31e8b8d2c1164 (diff) | |
parent | 0f9c24f819efb89c71e5c19fe194a8a1040b35d2 (diff) |
Merge tag 'systemd/v231-4.parabola1' into systemd/parabola
-rw-r--r-- | src/systemctl/systemctl.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c index 6a0ed79a53..114c4f1703 100644 --- a/src/systemctl/systemctl.c +++ b/src/systemctl/systemctl.c @@ -4685,12 +4685,14 @@ static int show_one( return log_error_errno(r, "Failed to map properties: %s", bus_error_message(&error, r)); if (streq_ptr(info.load_state, "not-found") && streq_ptr(info.active_state, "inactive")) { - log_error("Unit %s could not be found.", unit); + log_full(streq(verb, "status") ? LOG_ERR : LOG_DEBUG, + "Unit %s could not be found.", unit); if (streq(verb, "status")) return EXIT_PROGRAM_OR_SERVICES_STATUS_UNKNOWN; - return -ENOENT; + if (!streq(verb, "show")) + return -ENOENT; } r = sd_bus_message_rewind(reply, true); @@ -4755,10 +4757,11 @@ static int show_one( r = 0; if (show_properties) { char **pp; + int not_found_level = streq(verb, "show") ? LOG_DEBUG : LOG_WARNING; STRV_FOREACH(pp, arg_properties) if (!set_contains(found_properties, *pp)) { - log_warning("Property %s does not exist.", *pp); + log_full(not_found_level, "Property %s does not exist.", *pp); r = -ENXIO; } |