* Version $Id$
*/
/*
- 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
extern char *list_pool; /* in sql_cmds.c */
/* Imported functions */
-void set_pooldbr_from_poolres(POOL_DBR *pr, POOL *pool, e_pool_op op);
-int update_slots(UAContext *ua);
+void update_slots(UAContext *ua);
+
/* Forward referenced functions */
POOLMEM *query;
char ed1[130];
bool done = false;
+ int i;
const char *kw[] = {
_("VolStatus"), /* 0 */
_("VolRetention"), /* 1 */
_("AllFromPool"), /* 9 */
NULL };
- for (int i=0; kw[i]; i++) {
+ for (i=0; kw[i]; i++) {
int j;
POOL_DBR pr;
if ((j=find_arg_with_value(ua, kw[i])) > 0) {
}
for ( ; !done; ) {
- if (!select_media_dbr(ua, &mr)) {
- return 0;
- }
bsendmsg(ua, _("Updating Volume \"%s\"\n"), mr.VolumeName);
start_prompt(ua, _("Parameters to modify:\n"));
add_prompt(ua, _("Volume Status"));
add_prompt(ua, _("Volume from Pool"));
add_prompt(ua, _("All Volumes from Pool"));
add_prompt(ua, _("Done"));
- switch (do_prompt(ua, "", _("Select parameter to modify"), NULL, 0)) {
+ i = do_prompt(ua, "", _("Select parameter to modify"), NULL, 0);
+ /* For All Volumes from Pool we don't need a Volume record */
+ if (i != 12) {
+ if (!select_media_dbr(ua, &mr)) { /* Get Volume record */
+ return 0;
+ }
+ }
+ switch (i) {
case 0: /* Volume Status */
/* Modify Volume Status */
bsendmsg(ua, _("Current Volume status is: %s\n"), mr.VolStatus);
}
Slot = ua->pint32_val;
if (pr.MaxVols > 0 && Slot > (int)pr.MaxVols) {
- bsendmsg(ua, _("Invalid slot, it must be between 0 and %d\n"),
+ bsendmsg(ua, _("Invalid slot, it must be between 0 and MaxVols=%d\n"),
pr.MaxVols);
break;
}