]> git.sur5r.net Git - bacula/bacula/blob - bacula/patches/2.0.x/2.2.7-jobdefs-migtype.patch
Move
[bacula/bacula] / bacula / patches / 2.0.x / 2.2.7-jobdefs-migtype.patch
1
2  This patch permits to use migration options with JobDefs.
3  This patch fixes bug #1028.
4
5  Apply the patch to 2.2.7 (and possibly any 2.2.x version with):
6
7  cd <bacula-source>
8  patch -p0 <2.2.7-jobdefs-migtype.patch
9  ./configure <your-options>
10  make
11  ...
12  make install
13
14 Index: src/dird/dird.c
15 ===================================================================
16 --- src/dird/dird.c     (revision 6183)
17 +++ src/dird/dird.c     (working copy)
18 @@ -58,6 +58,7 @@
19  void store_jobtype(LEX *lc, RES_ITEM *item, int index, int pass);
20  void store_level(LEX *lc, RES_ITEM *item, int index, int pass);
21  void store_replace(LEX *lc, RES_ITEM *item, int index, int pass);
22 +void store_migtype(LEX *lc, RES_ITEM *item, int index, int pass);
23  void init_device_resources();
24  
25  static char *runjob = NULL;
26 @@ -698,6 +699,7 @@
27                            job_items[i].handler == store_jobtype ||
28                            job_items[i].handler == store_level   ||
29                            job_items[i].handler == store_pint    ||
30 +                          job_items[i].handler == store_migtype ||
31                            job_items[i].handler == store_replace) {
32                    def_ivalue = (int *)((char *)(job->jobdefs) + offset);
33                    Dmsg5(400, "Job \"%s\", field \"%s\" def_ivalue=%d item %d offset=%u\n",
34 Index: src/dird/dird_conf.c
35 ===================================================================
36 --- src/dird/dird_conf.c        (revision 6183)
37 +++ src/dird/dird_conf.c        (working copy)
38 @@ -74,8 +74,8 @@
39  void store_level(LEX *lc, RES_ITEM *item, int index, int pass);
40  void store_replace(LEX *lc, RES_ITEM *item, int index, int pass);
41  void store_acl(LEX *lc, RES_ITEM *item, int index, int pass);
42 +void store_migtype(LEX *lc, RES_ITEM *item, int index, int pass);
43  static void store_device(LEX *lc, RES_ITEM *item, int index, int pass);
44 -static void store_migtype(LEX *lc, RES_ITEM *item, int index, int pass);
45  static void store_runscript(LEX *lc, RES_ITEM *item, int index, int pass);
46  static void store_runscript_when(LEX *lc, RES_ITEM *item, int index, int pass);
47  static void store_runscript_cmd(LEX *lc, RES_ITEM *item, int index, int pass);
48 @@ -1548,7 +1548,7 @@
49   * Store JobType (backup, verify, restore)
50   *
51   */
52 -static void store_migtype(LEX *lc, RES_ITEM *item, int index, int pass)
53 +void store_migtype(LEX *lc, RES_ITEM *item, int index, int pass)
54  {
55     int token, i;
56