]> git.pld-linux.org Git - packages/shfs.git/commitdiff
- fix for `df`.
authorPaweł Sikora <pluto@pld-linux.org>
Fri, 18 Jun 2004 13:45:44 +0000 (13:45 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    shfs-df.patch -> 1.1

shfs-df.patch [new file with mode: 0644]

diff --git a/shfs-df.patch b/shfs-df.patch
new file mode 100644 (file)
index 0000000..b6d2742
--- /dev/null
@@ -0,0 +1,34 @@
+--- shfs/Linux-2.4/shell.c     3 Jun 2004 13:20:44 -0000       1.8
++++ 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/Linux-2.6/shell.c     3 Jun 2004 13:20:47 -0000       1.9
++++ 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)
This page took 0.094643 seconds and 4 git commands to generate.