* file named AUTHORS, in the root directory of this distribution.
*/
/*
- * $Id: planner.c,v 1.180 2006/03/10 13:51:06 martinea Exp $
+ * $Id: planner.c,v 1.180.2.1 2006/04/24 11:16:43 martinea Exp $
*
* backup schedule planner for the Amanda backup system.
*/
char *label;
{
tape_t *tp;
+ int runtapes;
+
+ runtapes = conf_runtapes;
+ if(runtapes == 0) runtapes = 1;
if((tp = lookup_tapelabel(label)) == NULL)
return 1; /* "shouldn't happen", but trigger warning message */
else if(!reusable_tape(tp))
return 1024;
else if(lookup_nb_tape() > conf_tapecycle)
- return (lookup_nb_tape() - tp->position) / conf_runtapes;
+ return (lookup_nb_tape() - tp->position) / runtapes;
else
- return (conf_tapecycle - tp->position) / conf_runtapes;
+ return (conf_tapecycle - tp->position) / runtapes;
}
/* Return the estimated size for a particular dump */
old_tape = lookup_tapelabel(info->inf[lev-1].label);
if(cur_tape == NULL || old_tape == NULL) return 0;
- nb_runs = (old_tape->position - cur_tape->position) / conf_runtapes;
+ if(conf_runtapes == 0)
+ nb_runs = (old_tape->position - cur_tape->position) / 1;
+ else
+ nb_runs = (old_tape->position - cur_tape->position) / conf_runtapes;
info->consecutive_runs = nb_runs;
return nb_runs;