Imported Upstream version 2.4.4p3
[debian/amanda] / patches / samba-largefs.patch
1 This patch fixes Samba 2.0.0 up to 2.0.3, so that it does not overflow
2 on filesystems larger than 2GB.  The problem is fixed in newer
3 releases of Samba.
4
5 Index: client/client.c
6 --- client/client.c     1999/01/27 19:37:27     1.125
7 +++ client/client.c     1999/03/30 10:25:18     1.128
8 @@ -101,7 +101,7 @@
9  int put_total_time_ms = 0;
10  
11  /* totals globals */
12 -int dir_total = 0;
13 +static double dir_total;
14  
15  #define USENMB
16  
17 @@ -430,7 +430,7 @@
18  
19         do_dskattr();
20  
21 -       DEBUG(3, ("Total bytes listed: %d\n", dir_total));
22 +       DEBUG(3, ("Total bytes listed: %.0f\n", dir_total));
23  }
24  
25  
26 @@ -463,7 +463,7 @@
27  
28         do_dskattr();
29  
30 -       DEBUG(0, ("Total number of bytes: %d\n", dir_total));
31 +       DEBUG(0, ("Total number of bytes: %.0f\n", dir_total));
32  }
33  
34  
35 Index: client/clitar.c
36 --- client/clitar.c     1999/02/03 16:30:54     1.67
37 +++ client/clitar.c     1999/03/30 10:41:07     1.70
38 @@ -85,7 +85,8 @@
39  #endif
40  
41  static char *tarbuf, *buffer_p;
42 -static int tp, ntarf, tbufsiz, ttarf;
43 +static int tp, ntarf, tbufsiz;
44 +static double ttarf;
45  /* Incremental mode */
46  BOOL tar_inc=False;
47  /* Reset archive bit */
48 @@ -1486,7 +1487,7 @@
49      free(tarbuf);
50      
51      DEBUG(0, ("tar: dumped %d tar files\n", ntarf));
52 -    DEBUG(0, ("Total bytes written: %d\n", ttarf));
53 +    DEBUG(0, ("Total bytes written: %.0f\n", (double)ttarf));
54      break;
55    }
56