diff --git a/src/knot/ctl/knotc_main.c b/src/knot/ctl/knotc_main.c index f5fbdbae7036073c00fccfa17419caac803a4c86..222b651331128b5d896c58d6fc309d938155f831 100644 --- a/src/knot/ctl/knotc_main.c +++ b/src/knot/ctl/knotc_main.c @@ -591,7 +591,7 @@ static int cmd_stop(int argc, char *argv[], unsigned flags) UNUSED(flags); if (argc > 0) { - log_error("command does not take arguments"); + printf("command does not take arguments\n"); return KNOT_EINVAL; } @@ -630,7 +630,7 @@ static int cmd_status(int argc, char *argv[], unsigned flags) UNUSED(flags); if (argc > 0) { - log_error("command does not take arguments"); + printf("command does not take arguments\n"); return KNOT_EINVAL; } diff --git a/src/knot/ctl/remote.c b/src/knot/ctl/remote.c index 10ab3de7281ca9798931e6676c6d580fe92cd3bf..337ec70cf83b1f6763d5d24d5ca0a64edb25bfde 100644 --- a/src/knot/ctl/remote.c +++ b/src/knot/ctl/remote.c @@ -416,7 +416,7 @@ static int remote_c_retransfer(server_t *s, remote_cmdargs_t* a) dbg_server("remote: %s\n", __func__); if (a->argc == 0) { /* Refresh all. */ - return KNOT_ENOTSUP; + return KNOT_CTL_ARG_REQ; } else { rcu_read_lock(); /* Refresh specific zones. */ @@ -463,7 +463,7 @@ static int remote_c_signzone(server_t *server, remote_cmdargs_t* arguments) if (arguments->argc == 0) { /* Resign all. */ - return KNOT_ENOTSUP; + return KNOT_CTL_ARG_REQ; } else { rcu_read_lock(); /* Resign specific zones. */ diff --git a/src/libknot/errcode.c b/src/libknot/errcode.c index 3d20bab305a401fff07f2d3676b27f77bb87bad8..999db9f9165b7b2b2b75fddf81c49a38857c8f9c 100644 --- a/src/libknot/errcode.c +++ b/src/libknot/errcode.c @@ -85,6 +85,7 @@ const error_table_t error_messages[] = { /* Control states. */ { KNOT_CTL_STOP, "stopping server" }, { KNOT_CTL_ACCEPTED, "command accepted" }, + { KNOT_CTL_ARG_REQ, "argument required" }, /* Network errors. */ { KNOT_NET_EADDR, "bad address or host name" }, diff --git a/src/libknot/errcode.h b/src/libknot/errcode.h index 2b2b1fc5e5b59d831aa89203f6e7b1d7c6ccc30a..53c7b116658e40f9b57ea2658a15983b3d2d623b 100644 --- a/src/libknot/errcode.h +++ b/src/libknot/errcode.h @@ -100,6 +100,7 @@ enum knot_error { /* Control states. */ KNOT_CTL_STOP, KNOT_CTL_ACCEPTED, + KNOT_CTL_ARG_REQ, /* Network errors. */ KNOT_NET_EADDR,