/*
Bacula® - The Network Backup Solution
- Copyright (C) 2001-2007 Free Software Foundation Europe e.V.
+ Copyright (C) 2001-2011 Free Software Foundation Europe e.V.
The main author of Bacula is Kern Sibbald, with contributions from
many others, a complete list can be found in the file AUTHORS.
*
* Kern Sibbald, August MMI
*
- * Version $Id$
*/
#ifndef __UA_H_
CONRES *cons; /* console resource */
POOLMEM *cmd; /* return command/name buffer */
POOLMEM *args; /* command line arguments */
- POOLMEM *err; /* store error message */
+ POOLMEM *errmsg; /* store error message */
char *argk[MAX_CMD_ARGS]; /* argument keywords */
char *argv[MAX_CMD_ARGS]; /* argument values */
int argc; /* number of arguments */
i = find_arg_with_value(ua, NT_("backupclient"));
}
if (i >= 0) {
- if (!is_name_valid(ua->argv[i], &ua->err)) {
- ua->error_msg("%s argument: %s", ua->argk[i], ua->err);
+ if (!is_name_valid(ua->argv[i], &ua->errmsg)) {
+ ua->error_msg("%s argument: %s", ua->argk[i], ua->errmsg);
return 0;
}
bstrncpy(rx->ClientName, ua->argv[i], sizeof(rx->ClientName));
/* try command line argument */
int i = find_arg_with_value(ua, NT_("restoreclient"));
if (i >= 0) {
- if (!is_name_valid(ua->argv[i], &ua->err)) {
- ua->error_msg("%s argument: %s", ua->argk[i], ua->err);
+ if (!is_name_valid(ua->argv[i], &ua->errmsg)) {
+ ua->error_msg("%s argument: %s", ua->argk[i], ua->errmsg);
return 0;
}
bstrncpy(rx.RestoreClientName, ua->argv[i], sizeof(rx.RestoreClientName));
memset(&fsr, 0, sizeof(fsr));
i = find_arg_with_value(ua, "FileSet");
- if (i >= 0 && is_name_valid(ua->argv[i], &ua->err)) {
+ if (i >= 0 && is_name_valid(ua->argv[i], &ua->errmsg)) {
bstrncpy(fsr.FileSet, ua->argv[i], sizeof(fsr.FileSet));
if (!db_get_fileset_record(ua->jcr, ua->db, &fsr)) {
ua->error_msg(_("Error getting FileSet \"%s\": ERR=%s\n"), fsr.FileSet,
i = -1;
}
} else if (i >= 0) { /* name is invalid */
- ua->error_msg(_("FileSet argument: %s\n"), ua->err);
+ ua->error_msg(_("FileSet argument: %s\n"), ua->errmsg);
}
if (i < 0) { /* fileset not found */
ua->db = jcr->db;
ua->cmd = get_pool_memory(PM_FNAME);
ua->args = get_pool_memory(PM_FNAME);
- ua->err = get_pool_memory(PM_FNAME);
+ ua->errmsg = get_pool_memory(PM_FNAME);
ua->verbose = true;
ua->automount = true;
return ua;
if (ua->args) {
free_pool_memory(ua->args);
}
- if (ua->err) {
- free_pool_memory(ua->err);
+ if (ua->errmsg) {
+ free_pool_memory(ua->errmsg);
}
if (ua->prompt) {
free(ua->prompt);