]> git.sur5r.net Git - bacula/bacula/blob - bacula/patches/2.2.4-ansi-label.patch
Commit ansi label patch
[bacula/bacula] / bacula / patches / 2.2.4-ansi-label.patch
1  
2  This patch fixes bug #954.
3  WEOF on non-appendable error when trying to label a tape with ANSI labels turned on.
4
5  Apply it to version 2.2.4 (possibly earlier versions with):
6
7  cd <bacula-source>
8  patch -p0 <2.2.4-verify.patch
9  ./configure (your options)
10  make
11  ...
12  make install
13
14 Index: src/stored/label.c
15 ===================================================================
16 --- src/stored/label.c  (revision 5602)
17 +++ src/stored/label.c  (working copy)
18 @@ -344,6 +344,9 @@
19        }
20     }
21  
22 +   /* Temporarily mark in append state to enable writing */
23 +   dev->set_append();
24 +
25     /* Create PRE_LABEL or VOL_LABEL if DVD */
26     create_volume_label(dev, VolName, PoolName, dvdnow);
27  
28 @@ -364,8 +367,6 @@
29     create_volume_label_record(dcr, dcr->rec);
30     dcr->rec->Stream = 0;
31  
32 -   /* Temporarily mark in append state to enable writing */
33 -   dev->set_append();
34     if (!write_record_to_block(dcr->block, dcr->rec)) {
35        Dmsg2(130, "Bad Label write on %s: ERR=%s\n", dev->print_name(), dev->print_errmsg());
36        goto bail_out;