commit d3a19d0da0ef43cd07f3084b8ad4c5672d50c3e6
parent 827e054a6829489dc7a947cfb62ce3fdc33c5bf9
Author: Geoff Johnstone <geoffSHEEP.johnstoneFROG@googlemail.com>
Date: Fri, 18 Apr 2008 13:46:58 +0100
Made statfs returned non-zero free blocks.
Ported tar target to Mercurial.
Diffstat:
2 files changed, 19 insertions(+), 3 deletions(-)
diff --git a/Makefile b/Makefile
@@ -85,9 +85,9 @@ tar: VERSION=$(shell grep 'USMB_VERSION[^_]' version.h | sed 's/.*0x//')
tar: STAGING=/tmp/usmb-$(VERSION)
tar:
mkdir $(STAGING)
- mtn --no-graph log > $(STAGING)/Changelog
+ hg log -v > $(STAGING)/Changelog
cp -a $(PWD)/* $(STAGING)/
- rm -rf $(STAGING)/_MTN
+ rm -rf $(STAGING)/.hg
(cd $(STAGING)/..; \
make -C $(STAGING) distclean ; \
tar jcf $(PWD)/usmb-$(VERSION).tar.bz2 usmb-$(VERSION) ; \
diff --git a/usmb.c b/usmb.c
@@ -105,6 +105,22 @@ static bool create_smb_context (char *domain, char *username, SMBCCTX **pctx)
}
+static int usmb_statfs (const char *path, struct statvfs *vfs)
+{
+ if ((NULL == path) || (NULL == vfs))
+ return -EINVAL;
+
+ memset (vfs, 0, sizeof (*vfs));
+
+ vfs->f_bsize = 32768;
+ vfs->f_blocks = 0x7FFFFFFFl;
+ vfs->f_bfree = 0x7FFFFFFFl;
+ vfs->f_bavail = 0x7FFFFFFFl;
+
+ return 0;
+}
+
+
static void * usmb_init (struct fuse_conn_info *conn)
{
DEBUG (fputs ("usmb_init()\n", stderr));
@@ -152,7 +168,7 @@ static struct fuse_operations fuse_ops = {
SET_ELEMENT (.open, usmb_open),
SET_ELEMENT (.read, usmb_read),
SET_ELEMENT (.write, usmb_write),
- SET_ELEMENT (.statfs, NULL),
+ SET_ELEMENT (.statfs, usmb_statfs),
SET_ELEMENT (.flush, NULL),
SET_ELEMENT (.release, usmb_release),
SET_ELEMENT (.fsync, NULL),