From: Kern Sibbald Date: Sun, 14 May 2017 13:07:19 +0000 (+0200) Subject: Fix compiler warning X-Git-Tag: Release-7.9.0~29 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=341a46096b7832086b29139136471f7ed63ab587;p=bacula%2Fbacula Fix compiler warning --- diff --git a/bacula/src/dird/dird_conf.c b/bacula/src/dird/dird_conf.c index f0c7d324ce..7cb924e054 100644 --- a/bacula/src/dird/dird_conf.c +++ b/bacula/src/dird/dird_conf.c @@ -524,6 +524,7 @@ RES_ITEM job_items[] = { {"Pool", store_res, ITEM(res_job.pool), R_POOL, ITEM_REQUIRED, 0}, {"NextPool", store_res, ITEM(res_job.next_pool), R_POOL, 0, 0}, {"FullBackupPool", store_res, ITEM(res_job.full_pool), R_POOL, 0, 0}, + {"VirtualFullBackupPool", store_res, ITEM(res_job.vfull_pool), R_POOL, 0, 0}, {"IncrementalBackupPool", store_res, ITEM(res_job.inc_pool), R_POOL, 0, 0}, {"DifferentialBackupPool", store_res, ITEM(res_job.diff_pool), R_POOL, 0, 0}, {"Client", store_res, ITEM(res_job.client), R_CLIENT, ITEM_REQUIRED, 0}, @@ -558,6 +559,7 @@ RES_ITEM job_items[] = { {"MaxWaitTime", store_time, ITEM(res_job.MaxWaitTime), 0, 0, 0}, {"MaxStartDelay",store_time, ITEM(res_job.MaxStartDelay), 0, 0, 0}, {"MaxFullInterval", store_time, ITEM(res_job.MaxFullInterval), 0, 0, 0}, + {"MaxVirtualFullInterval", store_time, ITEM(res_job.MaxVirtualFullInterval), 0, 0, 0}, {"MaxDiffInterval", store_time, ITEM(res_job.MaxDiffInterval), 0, 0, 0}, {"PrefixLinks", store_bool, ITEM(res_job.PrefixLinks), 0, ITEM_DEFAULT, false}, {"PruneJobs", store_bool, ITEM(res_job.PruneJobs), 0, ITEM_DEFAULT, false}, @@ -1052,6 +1054,10 @@ void dump_resource(int type, RES *ares, void sendit(void *sock, const char *fmt, sendit(sock, _(" --> ")); dump_resource(-R_POOL, (RES *)res->res_job.pool, sendit, sock); } + if (res->res_job.vfull_pool) { + sendit(sock, _(" --> VFullBackup")); + dump_resource(-R_POOL, (RES *)res->res_job.vfull_pool, sendit, sock); + } if (res->res_job.full_pool) { sendit(sock, _(" --> FullBackup")); dump_resource(-R_POOL, (RES *)res->res_job.full_pool, sendit, sock); @@ -1853,6 +1859,7 @@ bool save_resource(CONFIG *config, int type, RES_ITEM *items, int pass) res->res_job.pool = res_all.res_job.pool; res->res_job.next_pool = res_all.res_job.next_pool; res->res_job.full_pool = res_all.res_job.full_pool; + res->res_job.vfull_pool = res_all.res_job.vfull_pool; res->res_job.inc_pool = res_all.res_job.inc_pool; res->res_job.diff_pool = res_all.res_job.diff_pool; res->res_job.verify_job = res_all.res_job.verify_job; diff --git a/bacula/src/dird/job.c b/bacula/src/dird/job.c index a48806c4d3..1939aecefc 100644 --- a/bacula/src/dird/job.c +++ b/bacula/src/dird/job.c @@ -1059,6 +1059,7 @@ bool allow_duplicate_job(JCR *jcr) djcr->getJobType() == 'B' && jcr->getJobType() == 'B') { switch (jcr->getJobLevel()) { case L_FULL: + case L_VIRTUAL_FULL: if (djcr->getJobLevel() == L_DIFFERENTIAL || djcr->getJobLevel() == L_INCREMENTAL) { cancel_dup = true; @@ -1212,6 +1213,17 @@ void apply_pool_overrides(JCR *jcr) } } break; + case L_VIRTUAL_FULL: + if (jcr->vfull_pool) { + jcr->pool = jcr->vfull_pool; + pool_override = true; + if (jcr->run_vfull_pool_override) { + pm_strcpy(jcr->pool_source, _("Run VFullPool override")); + } else { + pm_strcpy(jcr->pool_source, _("Job VFullPool override")); + } + } + break; case L_INCREMENTAL: if (jcr->inc_pool) { jcr->pool = jcr->inc_pool; @@ -1587,6 +1599,7 @@ void set_jcr_defaults(JCR *jcr, JOB *job) pm_strcpy(jcr->next_pool_source, _("Job Pool's NextPool resource")); } jcr->full_pool = job->full_pool; + jcr->vfull_pool = job->vfull_pool; jcr->inc_pool = job->inc_pool; jcr->diff_pool = job->diff_pool; if (job->pool->catalog) { diff --git a/bacula/src/tools/dbcheck.c b/bacula/src/tools/dbcheck.c index 28f785a134..7299371805 100644 --- a/bacula/src/tools/dbcheck.c +++ b/bacula/src/tools/dbcheck.c @@ -343,7 +343,7 @@ int main (int argc, char *argv[]) return 0; } -static void print_catalog_details(CAT *catalog, const char *working_dir) +void print_catalog_details(CAT *catalog, const char *working_dir) { POOLMEM *catalog_details = get_pool_memory(PM_MESSAGE);