From: Kern Sibbald Date: Sun, 15 Mar 2009 11:29:57 +0000 (+0000) Subject: Add more output if a user attempts to clone a job but does not X-Git-Tag: Release-3.0.0~157 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=954cf18db925c6b5ccb35a812388260126f8b1e6;p=bacula%2Fbacula Add more output if a user attempts to clone a job but does not uniquely specify the Job name. This responds to bug #1248 which was not a bug, but improves user feedback. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@8535 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/src/dird/job.c b/bacula/src/dird/job.c index 084d4beea2..e8bf2a2aff 100644 --- a/bacula/src/dird/job.c +++ b/bacula/src/dird/job.c @@ -1342,7 +1342,8 @@ void create_clones(JCR *jcr) parse_ua_args(ua); /* parse command */ int stat = run_cmd(ua, ua->cmd); if (stat == 0) { - Jmsg(jcr, M_ERROR, 0, _("Could not start clone job.\n")); + Jmsg(jcr, M_ERROR, 0, _("Could not start clone job: \"%s\".\n"), + ua->cmd); } else { Jmsg(jcr, M_INFO, 0, _("Clone JobId %d started.\n"), stat); } diff --git a/bacula/src/dird/ua_select.c b/bacula/src/dird/ua_select.c index aabc4c51ea..d048861f00 100644 --- a/bacula/src/dird/ua_select.c +++ b/bacula/src/dird/ua_select.c @@ -1,7 +1,7 @@ /* Bacula® - The Network Backup Solution - Copyright (C) 2001-2008 Free Software Foundation Europe e.V. + Copyright (C) 2001-2009 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. @@ -762,7 +762,13 @@ int do_prompt(UAContext *ua, const char *automsg, const char *msg, } /* If running non-interactive, bail out */ if (ua->batch) { - ua->send_msg(_("Cannot select %s in batch mode.\n"), automsg); + /* First print the choices he wanted to make */ + ua->send_msg(ua->prompt[0]); + for (i=1; i < ua->num_prompts; i++) { + ua->send_msg("%6d: %s\n", i, ua->prompt[i]); + } + /* Now print error message */ + ua->send_msg(_("Your request has multiple choices for \"%s\". Selection is not possible in batch mode.\n"), automsg); item = -1; goto done; } diff --git a/bacula/technotes-2.5 b/bacula/technotes-2.5 index fc70c0b06d..9943796db4 100644 --- a/bacula/technotes-2.5 +++ b/bacula/technotes-2.5 @@ -42,6 +42,10 @@ Code to be completed before 3.0.0 is released: General: +15Mar09 +kes Add more output if a user attempts to clone a job but does not + uniquely specify the Job name. This responds to bug #1248 which + was not a bug, but improves user feedback. 14Mar09 kes Fix problems with bug #1247 and 64 bit time_t OSes by not editing (printf) time_t values.