}
rc = regexec(preg, what, nmatch, pmatch, 0);
if (rc == 0) {
- size = pmatch[0].rm_eo - pmatch[0].rm_so;
-
+#if 0
+ Pmsg1(0, "\n\n%s\n0123456789012345678901234567890123456789\n 10 20 30\n", what);
+ Pmsg2(0, "%i-%i\n", pmatch[0].rm_so, pmatch[0].rm_eo);
+ Pmsg2(0, "%i-%i\n", pmatch[1].rm_so, pmatch[1].rm_eo);
+ Pmsg2(0, "%i-%i\n", pmatch[2].rm_so, pmatch[2].rm_eo);
+ Pmsg2(0, "%i-%i\n", pmatch[3].rm_so, pmatch[3].rm_eo);
+#endif
+ size = pmatch[1].rm_eo - pmatch[1].rm_so;
*buf = check_pool_memory_size(*buf, size + 1);
- memcpy(*buf, what+pmatch[0].rm_so, size);
+ memcpy(*buf, what+pmatch[1].rm_so, size);
(*buf)[size] = 0;
items->list.append(bstrdup(*buf));
/* We search for the next keyword in the line */
- match_kw(preg, what + pmatch[0].rm_eo, len - pmatch[0].rm_eo, buf);
+ match_kw(preg, what + pmatch[1].rm_eo, len - pmatch[1].rm_eo, buf);
}
}
int rc;
init_items();
- rc = regcomp(&preg,
- "([a-z]+=|done|select|all|listing|jobs|stats|slots)",
- REG_EXTENDED);
+ rc = regcomp(&preg, "(([a-z]+=)|([a-z]+)( |$))", REG_EXTENDED);
if (rc != 0) {
return;
}
{ NT_("exit"), quit_cmd, _("Terminate Bconsole session"), NT_(""), false},
{ NT_("gui"), gui_cmd, _("Non-interactive gui mode"), NT_("on | off"), false},
- { NT_("help"), help_cmd, _("Print this command"), NT_(""), false},
+ { NT_("help"), help_cmd, _("Print help on specific command"),
+ NT_("add autodisplay automount cancel create delete disable enable estimate exit gui label list llist messages "
+ "memory mount prune purge python quit query restore relabel release reload run status setdebug setip show "
+ "sqlquery time trace unmount umount update use var version wait"), false},
+
{ NT_("label"), label_cmd, _("Label a tape"), NT_("storage=<storage> volume=<vol> pool=<pool>"), false},
{ NT_("list"), list_cmd, _("List objects from catalog"),
NT_("pools | jobs | jobtotals | media <pool=pool-name> | files jobid=<nn> | copies jobid=<nn>"), true},
{ NT_("quit"), quit_cmd, _("Terminate Bconsole session"), NT_(""), false},
{ NT_("query"), querycmd, _("Query catalog"), NT_(""), false},
{ NT_("restore"), restore_cmd, _("Restore files"),
- NT_("where=/path client=<client> storage=<storage> bootstrap=<file> jobid=<jobid> done select all"), false},
+ NT_("where=</path> client=<client> storage=<storage> bootstrap=<file> jobid=<jobid> done select all"), false},
{ NT_("relabel"), relabel_cmd, _("Relabel a tape"),
NT_("storage=<storage-name> oldvolume=<old-volume-name> volume=<newvolume-name>"), false},
NT_("storage=<storage-name> [ drive=<num> ] | jobid=<id> | job=<job-name>"), false},
{ NT_("update"), update_cmd, _("Update volume, pool or stats"),
- NT_("pool=<poolname> | slots | stats | volume=<volname> volstatus=<status> volretention=<time-def> "
+ NT_("pool=<poolname> | slots storage=<storage> scan| stats | volume=<volname> volstatus=<status> volretention=<time-def> "
"pool=<pool> recycle=<yes/no> slot=<number> inchanger=<yes/no>"),true},
{ NT_("use"), use_cmd, _("Use catalog xxx"), NT_(""), false},
{ NT_("var"), var_cmd, _("Does variable expansion"), NT_(""), false},
{ NT_("version"), version_cmd, _("Print Director version"), NT_(""), true},
{ NT_("wait"), wait_cmd, _("Wait until no jobs are running"),
- NT_("<jobname=name> | <jobid=nnn> | <ujobid=complete_name>"), false}
+ NT_("jobname=<name> | jobid=<nnn> | ujobid=<complete_name>"), false}
};
#define comsize ((int)(sizeof(commands)/sizeof(struct cmdstruct)))