* Version $Id$
*/
/*
- Copyright (C) 2002-2005 Kern Sibbald
+ Copyright (C) 2002-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
RESTORE_CTX rx; /* restore context */
JOB *job;
int i;
- POOLMEM *fname;
+ JCR *jcr = ua->jcr;
memset(&rx, 0, sizeof(rx));
rx.path = get_pool_memory(PM_FNAME);
}
/* Build run command */
- fname = get_pool_memory(PM_MESSAGE);
- make_unique_restore_filename(ua, &fname);
if (rx.where) {
Mmsg(ua->cmd,
"run job=\"%s\" client=\"%s\" storage=\"%s\" bootstrap=\"%s\""
" where=\"%s\" files=%d catalog=\"%s\"",
job->hdr.name, rx.ClientName, rx.store?rx.store->hdr.name:"",
- fname, rx.where, rx.selected_files, ua->catalog->hdr.name);
+ jcr->RestoreBootstrap, rx.where, rx.selected_files, ua->catalog->hdr.name);
} else {
Mmsg(ua->cmd,
"run job=\"%s\" client=\"%s\" storage=\"%s\" bootstrap=\"%s\""
" files=%d catalog=\"%s\"",
job->hdr.name, rx.ClientName, rx.store?rx.store->hdr.name:"",
- fname, rx.selected_files, ua->catalog->hdr.name);
+ jcr->RestoreBootstrap, rx.selected_files, ua->catalog->hdr.name);
}
- free_pool_memory(fname);
- if (find_arg(ua, N_("yes")) > 0) {
+ if (find_arg(ua, NT_("yes")) > 0) {
pm_strcat(ua->cmd, " yes"); /* pass it on to the run command */
}
Dmsg1(100, "Submitting: %s\n", ua->cmd);
if (!rx->ClientName[0]) {
CLIENT_DBR cr;
/* try command line argument */
- int i = find_arg_with_value(ua, N_("client"));
+ int i = find_arg_with_value(ua, NT_("client"));
if (i >= 0) {
if (!has_value(ua, i)) {
return 0;
/* Check MediaType and select storage that corresponds */
get_storage_from_mediatype(ua, &rx->name_list, rx);
- if (find_arg(ua, N_("done")) < 0) {
+ if (find_arg(ua, NT_("done")) < 0) {
/* Let the user interact in selecting which files to restore */
OK = user_select_files_from_tree(&tree);
}
}
-/* Return next JobId from comma separated list */
+/*
+ * Return next JobId from comma separated list
+ *
+ * Returns:
+ * 1 if next JobId returned
+ * 0 if no more JobIds are in list
+ * -1 there is an error
+ */
int get_next_jobid_from_list(char **p, JobId_t *JobId)
{
char jobid[30];