*/
/*
- Copyright (C) 2000-2005 Kern Sibbald
+ Copyright (C) 2000-2006 Kern Sibbald
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
switch (find_arg_keyword(ua, kw)) {
case 0:
- ua->auto_display_messages = 1;
+ ua->auto_display_messages = true;
break;
case 1:
- ua->auto_display_messages = 0;
+ ua->auto_display_messages = false;
break;
default:
bsendmsg(ua, _("ON or OFF keyword missing.\n"));
}
/*
- * Turn batch processing on/off
+ * Turn GUI mode on/off
*/
int gui_cmd(UAContext *ua, const char *cmd)
{
switch (find_arg_keyword(ua, kw)) {
case 0:
- ua->batch = true;
- ua->jcr->gui = true;
+ ua->jcr->gui = ua->gui = true;
break;
case 1:
- ua->batch = false;
- ua->jcr->gui = false;
+ ua->jcr->gui = ua->gui = false;
break;
default:
bsendmsg(ua, _("ON or OFF keyword missing.\n"));
} else if (strcasecmp(ua->argk[i], N_("jobtotals")) == 0) {
db_list_job_totals(ua->jcr, ua->db, &jr, prtit, ua);
- /* List JOBID */
+ /* List JOBID=nn */
} else if (strcasecmp(ua->argk[i], N_("jobid")) == 0) {
if (ua->argv[i]) {
jobid = str_to_int64(ua->argv[i]);
}
}
- /* List JOB */
+ /* List JOB=xxx */
} else if (strcasecmp(ua->argk[i], N_("job")) == 0 && ua->argv[i]) {
bstrncpy(jr.Job, ua->argv[i], MAX_NAME_LENGTH);
jr.JobId = 0;
db_list_job_records(ua->jcr, ua->db, &jr, prtit, ua, llist);
+ /* List JOBNAME=xxx */
+ } else if (strcasecmp(ua->argk[i], N_("job")) == 0 && ua->argv[i]) {
+ bstrncpy(jr.Name, ua->argv[i], MAX_NAME_LENGTH);
+ jr.JobId = 0;
+ db_list_job_records(ua->jcr, ua->db, &jr, prtit, ua, llist);
+
+
/* List FILES */
} else if (strcasecmp(ua->argk[i], N_("files")) == 0) {
if (!complete_jcr_for_job(jcr, job, pool)) {
return false;
}
- mr.PoolId = jcr->PoolId;
+ mr.PoolId = jcr->jr.PoolId;
if (run->storage) {
jcr->store = run->storage;
}
memset(&pr, 0, sizeof(pr));
- pr.PoolId = jcr->PoolId;
+ pr.PoolId = jcr->jr.PoolId;
if (! db_get_pool_record(ua->jcr, ua->db, &pr)) {
strcpy(pr.Name, "*UnknownPool*");
}
}
for ( ; run; run=run->next) {
/*
- * Find runs in next 24 hours
+ * Find runs in next 24 hours. Day 0 is today, so if
+ * ndays=1, look at today and tomorrow.
*/
for (day = 0; day <= ndays; day++) {
future = now + (day * 60 * 60 * 24);
Jmsg(jcr, M_INFO, 0, _("Pool %s created in database.\n"), pr.Name);
}
}
- jcr->PoolId = pr.PoolId;
jcr->jr.PoolId = pr.PoolId;
return 1;
}
do_truncate = true;
}
if (do_truncate) {
- ftruncate(fileno(con_fd), 0L);
+ (void)ftruncate(fileno(con_fd), 0L);
}
console_msg_pending = FALSE;
ua->user_notified_msg_pending = FALSE;