[systemd-devel] [PATCHv2] systemctl: warn about use of deprecated options

Maciej Wereski m.wereski at partner.samsung.com
Fri Jul 19 02:21:04 PDT 2013


---
I should have thought about it in previous commit, sorry for that!

since v1:
* fixed typo
---
 src/systemctl/systemctl.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
index c9f9981..f09ccca 100644
--- a/src/systemctl/systemctl.c
+++ b/src/systemctl/systemctl.c
@@ -5012,6 +5012,7 @@ static int systemctl_parse_argv(int argc, char *argv[]) {
                                  * in --types= too for compatibility
                                  * with old versions */
                                 if (unit_load_state_from_string(optarg) >= 0) {
+                                        log_warning("Using --type for load states is deprecated, please use --state instead.");
                                         if (strv_push(&arg_states, type) < 0)
                                                 return log_oom();
                                         type = NULL;
@@ -5128,6 +5129,7 @@ static int systemctl_parse_argv(int argc, char *argv[]) {
                         break;
 
                 case ARG_FAILED:
+                        log_warning("Use of --failed is deprecated, please use --state=failed instead.");
                         if (strv_extend(&arg_states, "failed") < 0)
                                 return log_oom();
 
-- 
1.8.3.3



More information about the systemd-devel mailing list