]> git.sur5r.net Git - bacula/bacula/commitdiff
New tape block rounding code
authorKern Sibbald <kern@sibbald.com>
Sat, 1 May 2004 10:35:56 +0000 (10:35 +0000)
committerKern Sibbald <kern@sibbald.com>
Sat, 1 May 2004 10:35:56 +0000 (10:35 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@1335 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/src/count-lines
bacula/src/stored/block.c
bacula/src/version.h

index cd70669b770b84fb83684a0aa51f46ff2bd4ee8e..d1383c93a2b93da5d869331c22f451da421af64e 100755 (executable)
@@ -2,7 +2,8 @@
 rm -f 1
 touch 1
 for i in . console gnome-console cats dird filed filed/win32 \
-     win32 win32/compat findlib lib wx-console stored tools; do
+     win32 win32/compat findlib lib wx-console stored tools \
+     win32/wx-console win32/console win32/baculafd; do
   ls -1 $i/*.c $i/*.cpp $i/*.h $i/*.in 2>/dev/null >>1
 done
 cat 1 | $HOME/bin/lines
index b2b20d7630f3dfaf423436102d7341322f1408aa..47c48ca5f1b741723fc3ecf64bed6d3a94c77a19 100644 (file)
@@ -427,12 +427,15 @@ int write_block_to_dev(DCR *dcr, DEV_BLOCK *block)
 
       /* Adjust write size to min/max for tapes only */
       if (dev->state & ST_TAPE) {
-        if (wlen < dev->min_block_size) {
-           wlen =  ((dev->min_block_size + TAPE_BSIZE - 1) / TAPE_BSIZE) * TAPE_BSIZE;
-        }
         /* check for fixed block size */
         if (dev->min_block_size == dev->max_block_size) {
            wlen = block->buf_len;    /* fixed block size already rounded */
+        /* Check for min block size */
+        } else if (wlen < dev->min_block_size) {
+           wlen =  ((dev->min_block_size + TAPE_BSIZE - 1) / TAPE_BSIZE) * TAPE_BSIZE;
+        /* Ensure size is rounded */
+        } else {
+           wlen = ((wlen + TAPE_BSIZE - 1) / TAPE_BSIZE) * TAPE_BSIZE;
         }
       }
       if (wlen-blen > 0) {
index 74f16583e8039a4f0b6e8927e80934e0ba236a3a..0996e32887b243c583dcc330e5f2fa8834529f00 100644 (file)
@@ -2,8 +2,8 @@
 #undef  VERSION
 #define VERSION "1.34.3"
 #define VSTRING "1"
-#define BDATE   "30 Apr 2004"
-#define LSMDATE "30Apr04"
+#define BDATE   "01 May 2004"
+#define LSMDATE "01May04"
 
 /* Debug flags */
 #undef  DEBUG