X-Git-Url: http://git.openwrt.org/?a=blobdiff_plain;f=package%2Fshfs%2Fpatches%2F107-df.patch;fp=package%2Fshfs%2Fpatches%2F107-df.patch;h=07eaaf234f0130f6419f596b8c05ddc9fbdc0361;hb=820555812e16ae9709c5d743d3250ab744c664e4;hp=0000000000000000000000000000000000000000;hpb=6a543b6c1e4ea681cb4900636f4ed85535bf199f;p=openwrt%2Fopenwrt.git diff --git a/package/shfs/patches/107-df.patch b/package/shfs/patches/107-df.patch new file mode 100644 index 0000000000..07eaaf234f --- /dev/null +++ b/package/shfs/patches/107-df.patch @@ -0,0 +1,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)