File: st_bsize

package info (click to toggle)
dump 0.4b47-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 3,316 kB
  • sloc: ansic: 16,267; sh: 5,138; makefile: 161
file content (16 lines) | stat: -rw-r--r-- 607 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Description: handle non-power-of-two filesystem i/o blocksizes better
 fix for bug#995992
Author: Alexander Zangerl <az@debian.org>
--- a/restore/tape.c
+++ b/restore/tape.c
@@ -394,8 +394,9 @@ setup(void)
 		fssize = TP_BSIZE;
 	if (stbuf.st_blksize >= TP_BSIZE && stbuf.st_blksize <= MAXBSIZE)
 		fssize = stbuf.st_blksize;
+  /* is it a power of two? fssize needs to be divisible by TP_BSIZE */
 	if (((fssize - 1) & fssize) != 0)
-		errx(1, "bad block size %ld", fssize);
+     fssize = MAXBSIZE;
 	if (spcl.c_volume != 1)
 		errx(1, "Tape is not volume 1 of the dump");
 	if (gethead(&spcl) == FAIL) {