From: Jan Hák Date: Thu, 3 Feb 2022 10:14:47 +0000 (+0100) Subject: knsupdate: adds the 'exit' command as a synonym to the existing 'quit' X-Git-Tag: v3.3.dev~208^2~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c2dc2bae48fa62221f8dfd3c9190d998fdcf574b;p=thirdparty%2Fknot-dns.git knsupdate: adds the 'exit' command as a synonym to the existing 'quit' --- diff --git a/doc/man/knsupdate.1in b/doc/man/knsupdate.1in index 7c63a1fbdc..5f0d2c406f 100644 --- a/doc/man/knsupdate.1in +++ b/doc/man/knsupdate.1in @@ -149,8 +149,8 @@ Displays the last answer from the server. \fBdebug\fP Enable debugging. This command has the same meaning as the \fB\-d\fP program option. .TP -\fBquit\fP -Quit the program. +\fBexit\fP +End the program. .UNINDENT .SH NOTES .sp @@ -185,7 +185,7 @@ $ knsupdate > show > send > answer -> quit +> exit .ft P .fi .UNINDENT diff --git a/doc/man_knsupdate.rst b/doc/man_knsupdate.rst index 20c93ed2be..d01b0167d3 100644 --- a/doc/man_knsupdate.rst +++ b/doc/man_knsupdate.rst @@ -126,8 +126,8 @@ Commands **debug** Enable debugging. This command has the same meaning as the **-d** program option. -**quit** - Quit the program. +**exit** + End the program. Notes ----- @@ -162,7 +162,7 @@ Examples > show > send > answer - > quit + > exit See Also -------- diff --git a/src/utils/knsupdate/knsupdate_exec.c b/src/utils/knsupdate/knsupdate_exec.c index 9ffd882254..ff2ccfc4d4 100644 --- a/src/utils/knsupdate/knsupdate_exec.c +++ b/src/utils/knsupdate/knsupdate_exec.c @@ -52,7 +52,7 @@ int cmd_nxrrset(const char *lp, knsupdate_params_t *params); int cmd_oldgsstsig(const char* lp, knsupdate_params_t *params); int cmd_origin(const char* lp, knsupdate_params_t *params); int cmd_prereq(const char* lp, knsupdate_params_t *params); -int cmd_quit(const char* lp, knsupdate_params_t *params); +int cmd_exit(const char* lp, knsupdate_params_t *params); int cmd_realm(const char* lp, knsupdate_params_t *params); int cmd_send(const char* lp, knsupdate_params_t *params); int cmd_server(const char* lp, knsupdate_params_t *params); @@ -74,6 +74,7 @@ const char* knsupdate_cmd_array[] = { "\x5" "debug", "\x3" "del", "\x6" "delete", + "\x4" "exit", "\x7" "gsstsig", "\x3" "key", /* {[alg:]name} {secret} */ "\x5" "local", /* {address} [port] */ @@ -102,6 +103,7 @@ cmd_handle_f cmd_handle[] = { cmd_debug, cmd_del, cmd_del, /* delete/del synonyms */ + cmd_exit, cmd_gsstsig, cmd_key, cmd_local, @@ -110,7 +112,7 @@ cmd_handle_f cmd_handle[] = { cmd_oldgsstsig, cmd_origin, cmd_prereq, - cmd_quit, + cmd_exit, /* exit/quit synonyms */ cmd_realm, cmd_send, cmd_server, @@ -789,7 +791,7 @@ int cmd_prereq(const char* lp, knsupdate_params_t *params) return ret; } -int cmd_quit(const char* lp, knsupdate_params_t *params) +int cmd_exit(const char* lp, knsupdate_params_t *params) { DBG("%s: lp='%s'\n", __func__, lp);