]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
Fix #1108 Enhance setdebug help command and console completion
authorEric Bollengier <eric@baculasystems.com>
Mon, 15 Jun 2015 13:02:09 +0000 (15:02 +0200)
committerKern Sibbald <kern@sibbald.com>
Sat, 14 Jul 2018 17:13:58 +0000 (19:13 +0200)
bacula/src/dird/ua_cmds.c
bacula/src/dird/ua_dotcmds.c
bacula/src/lib/message.c
bacula/src/lib/message.h

index e871dad8512109409bc1858442416616cca182d3..8022f873799333d974c2bde111d076f86f54de3a 100644 (file)
@@ -173,7 +173,7 @@ static struct cmdstruct commands[] = {                                      /* C
 
  { NT_("stop"),       cancel_cmd,    _("Stop a job"), NT_("jobid=<number-list> job=<job-name> ujobid=<unique-jobid> all"), false},
  { NT_("setdebug"),   setdebug_cmd,  _("Sets debug level"),
-   NT_("level=<nn> trace=0/1 options=<0tTc> tags=<tags> | client=<client-name> | dir | storage=<storage-name> | all"), true},
+   NT_("level=<nn> tags=<tags> trace=0/1 options=<0tTc> tags=<tags> | client=<client-name> | dir | storage=<storage-name> | all"), true},
 
  { NT_("setbandwidth"),   setbwlimit_cmd,  _("Sets bandwidth"),
    NT_("limit=<speed> client=<client-name> jobid=<number> job=<job-name> ujobid=<unique-jobid>"), true},
index ff7cfdf0bbd8b41ccb1c28ff7b1dccd58fdc80be..8990e4a79a08cd0d88a5199da794b8b8c167d833 100644 (file)
@@ -1872,7 +1872,7 @@ static bool typescmd(UAContext *ua, const char *cmd)
 
 static bool tagscmd(UAContext *ua, const char *cmd)
 {
-   uint32_t i = 0;
+   uint i = 0;
    for (const char *p = debug_get_tag(i++, NULL) ; p ; p = debug_get_tag(i++, NULL)) {
       ua->send_msg("%s\n", p);
    }
index 3b7315177a08135009447df5d9a7ed5a4357add4..ad8c519e55f7ea0383516e07526d1ae3fbe8fe2c 100644 (file)
@@ -1847,7 +1847,7 @@ static struct debugtags debug_tags[] = {
 
 #define MAX_TAG (sizeof(debug_tags) / sizeof(struct debugtags))
 
-const char *debug_get_tag(uint32_t pos, const char **desc)
+const char *debug_get_tag(uint pos, const char **desc)
 {
    if (pos < MAX_TAG) {
       if (desc) {
index b76f36e1d05958aa6b5325e27e0e160114495867..04ccaeba483f87874e8c3bc81222c9a28eeeb4fb 100644 (file)
@@ -165,7 +165,7 @@ struct MQUEUE_ITEM {
 #define    DT_ASX        (1<<16)                /* used by Alain for personal debugging */
 #define    DT_ALL        (0x7FFF0000)           /* all (up to debug_level 65635, 15 flags available) */
 
-const char *debug_get_tag(uint32_t pos, const char **desc);
+const char *debug_get_tag(uint pos, const char **desc);
 bool debug_find_tag(const char *tagname, bool add, int64_t *current_level);
 bool debug_parse_tags(const char *options, int64_t *current_level);