From dfa1a9c80f3be4d004a4dcf0139809d793ec0295 Mon Sep 17 00:00:00 2001 From: Philipp Storz Date: Fri, 30 Aug 2013 21:07:40 +0200 Subject: [PATCH] default preview days of status scheduler is now 7 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 --- src/dird/ua_status.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/dird/ua_status.c b/src/dird/ua_status.c index 6dd09960a5e..c7419daa87c 100644 --- a/src/dird/ua_status.c +++ b/src/dird/ua_status.c @@ -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); @@ -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]; @@ -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; } }