summaryrefslogtreecommitdiff
path: root/package/shfs/patches/107-df.patch
blob: 07eaaf234f0130f6419f596b8c05ddc9fbdc0361 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
--- shfs-0.35.orig/shfs/Linux-2.4/shell.c	3 Jun 2004 13:20:44 -0000	1.8
+++ shfs-0.35/shfs/Linux-2.4/shell.c	18 Jun 2004 12:19:52 -0000
@@ -961,11 +961,11 @@
 
 	s = info->sockbuf;
 	if ((p = strsep(&s, " ")))
-		attr->f_blocks = simple_strtoull(p, NULL, 10);
+		attr->f_blocks = simple_strtoull(p, NULL, 10) >> 2;
 	if ((p = strsep(&s, " ")))
-		attr->f_bfree = attr->f_blocks - simple_strtoull(p, NULL, 10);
+		attr->f_bfree = attr->f_blocks - (simple_strtoull(p, NULL, 10) >> 2);
 	if ((p = strsep(&s, " ")))
-		attr->f_bavail = simple_strtoull(p, NULL, 10);
+		attr->f_bavail = simple_strtoull(p, NULL, 10) >> 2;
 
 	result = sock_readln(info, info->sockbuf, SOCKBUF_SIZE);
 	if (result < 0)
--- shfs-0.35.orig/shfs/Linux-2.6/shell.c	3 Jun 2004 13:20:47 -0000	1.9
+++ shfs-0.35/shfs/Linux-2.6/shell.c	18 Jun 2004 12:19:53 -0000
@@ -974,11 +974,11 @@
 
 	s = info->sockbuf;
 	if ((p = strsep(&s, " ")))
-		attr->f_blocks = simple_strtoull(p, NULL, 10);
+		attr->f_blocks = simple_strtoull(p, NULL, 10) >> 2;
 	if ((p = strsep(&s, " ")))
-		attr->f_bfree = attr->f_blocks - simple_strtoull(p, NULL, 10);
+		attr->f_bfree = attr->f_blocks - (simple_strtoull(p, NULL, 10) >> 2);
 	if ((p = strsep(&s, " ")))
-		attr->f_bavail = simple_strtoull(p, NULL, 10);
+		attr->f_bavail = simple_strtoull(p, NULL, 10) >> 2;
 
 	result = sock_readln(info, info->sockbuf, SOCKBUF_SIZE);
 	if (result < 0)