]> git.sur5r.net Git - bacula/bacula/commitdiff
Fix compiler warning
authorKern Sibbald <kern@sibbald.com>
Sun, 14 May 2017 13:07:19 +0000 (15:07 +0200)
committerKern Sibbald <kern@sibbald.com>
Mon, 22 May 2017 13:01:43 +0000 (15:01 +0200)
bacula/src/dird/dird_conf.c
bacula/src/dird/job.c
bacula/src/tools/dbcheck.c

index f0c7d324ce89850d246a5ce6fba1fb4180ac6744..7cb924e054a7679cf0c337b3bd11ebea15730b3e 100644 (file)
@@ -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;
index a48806c4d3ba04128b9de6f7b579597c29d42ccd..1939aecefc837ab0711803b1dffe0a07d7f1b6f9 100644 (file)
@@ -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) {
index 28f785a134065bd2a130975e43fddb67b9e48ba4..7299371805a6476d54942ece9fcd762b89b4f4d5 100644 (file)
@@ -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);