Skip to content

Commit

Permalink
default preview days of status scheduler is now 7
Browse files Browse the repository at this point in the history
Before, we had 14 as default preview but the output
always scrolls out of the normal terminal window.

Also, one week is better to overview for humans than two.

Signed-off-by: Marco van Wieringen <marco.van.wieringen@bareos.com>
  • Loading branch information
pstorz authored and Marco van Wieringen committed Feb 17, 2015
1 parent a094fb5 commit dfa1a9c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/dird/ua_status.c
Expand Up @@ -29,6 +29,8 @@
#include "bareos.h"
#include "dird.h"

#define DEFAULT_STATUS_SCHED_DAYS 7

extern void *start_heap;

static void list_scheduled_jobs(UAContext *ua);
Expand Down Expand Up @@ -575,7 +577,7 @@ static void do_scheduler_status(UAContext *ua)
{
int i;
int max_date_len = 0;
int days = 14; /* Default days for preview */
int days = DEFAULT_STATUS_SCHED_DAYS; /* Default days for preview */
bool schedulegiven = false;
time_t time_to_check, now, start, stop;
char schedulename[MAX_NAME_LENGTH];
Expand All @@ -595,7 +597,7 @@ static void do_scheduler_status(UAContext *ua)
days = atoi(ua->argv[i]);
if (((days < -366) || (days > 366)) && !ua->api) {
ua->send_msg(_("Ignoring invalid value for days. Allowed is -366 < days < 366.\n"));
days = 14;
days = DEFAULT_STATUS_SCHED_DAYS;
}
}

Expand Down

0 comments on commit dfa1a9c

Please sign in to comment.