1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-11-28 12:27:32 +02:00
openwrt-xburst/package/shfs/patches/107-df.patch

39 lines
1.6 KiB
Diff
Raw Normal View History

Index: shfs-0.35/shfs/Linux-2.4/shell.c
===================================================================
--- shfs-0.35.orig/shfs/Linux-2.4/shell.c 2007-06-04 13:22:59.249847936 +0200
+++ shfs-0.35/shfs/Linux-2.4/shell.c 2007-06-04 13:22:59.643788048 +0200
@@ -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)
Index: shfs-0.35/shfs/Linux-2.6/shell.c
===================================================================
--- shfs-0.35.orig/shfs/Linux-2.6/shell.c 2007-06-04 13:22:59.249847936 +0200
+++ shfs-0.35/shfs/Linux-2.6/shell.c 2007-06-04 13:22:59.643788048 +0200
@@ -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)