]> git.sur5r.net Git - bacula/bacula/commitdiff
Implement .help command.
authorNicolas Boichat <nicolas@boichat.ch>
Sat, 7 Aug 2004 21:44:23 +0000 (21:44 +0000)
committerNicolas Boichat <nicolas@boichat.ch>
Sat, 7 Aug 2004 21:44:23 +0000 (21:44 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@1515 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/src/dird/ua_cmds.c
bacula/src/dird/ua_dotcmds.c

index 18b17af87fae77c26afc194b379e3eb560269be4..f29f9d7a8bd5ba42ed3a18bec6bb5eedd9b9e033 100644 (file)
@@ -88,6 +88,7 @@ static int update_cmd(UAContext *ua, const char *cmd);
 static int wait_cmd(UAContext *ua, const char *cmd);
 static int setip_cmd(UAContext *ua, const char *cmd);
 
+int qhelp_cmd(UAContext *ua, const char *cmd);
 int quit_cmd(UAContext *ua, const char *cmd);
 
 
@@ -1887,6 +1888,16 @@ static int help_cmd(UAContext *ua, const char *cmd)
    return 1;
 }
 
+int qhelp_cmd(UAContext *ua, const char *cmd)
+{
+   unsigned int i;
+
+   for (i=0; i<comsize; i++) {
+      bsendmsg(ua, _("%s %s\n"), _(commands[i].key), _(commands[i].help));
+   }
+   return 1;
+}
+
 static int version_cmd(UAContext *ua, const char *cmd)
 {
    bsendmsg(ua, "%s Version: " VERSION " (" BDATE ")\n", my_name);
index c9255d6594e69efa9a2219f14f7ee9b2b336f0a4..01296ef0eb2f4ba278b28551a0553347cfd3db26 100644 (file)
@@ -44,6 +44,7 @@ extern const char *client_backups;
 /* Imported functions */
 extern int qmessagescmd(UAContext *ua, const char *cmd);
 extern int quit_cmd(UAContext *ua, const char *cmd);
+extern int qhelp_cmd(UAContext *ua, const char *cmd);
 
 /* Forward referenced functions */
 static int diecmd(UAContext *ua, const char *cmd);
@@ -72,6 +73,7 @@ static struct cmdstruct commands[] = {
  { N_(".storage"),    storagecmd,   NULL},
  { N_(".defaults"),   defaultscmd,  NULL},
  { N_(".messages"),   qmessagescmd, NULL},
+ { N_(".help"),       qhelp_cmd,    NULL},
  { N_(".quit"),       quit_cmd,     NULL},
  { N_(".exit"),       quit_cmd,     NULL} 
             };