partial fix for statfs (namelen is still broken) [0.07_2] 0.07_2
authorDobrica Pavlinusic <dpavlin@rot13.org>
Mon, 2 Jan 2006 22:24:03 +0000 (22:24 +0000)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Mon, 2 Jan 2006 22:24:03 +0000 (22:24 +0000)
git-svn-id: svn+ssh://llin/home/dpavlin/private/svn/fuse/perl-llin@26 6e4b0b00-1209-0410-87b2-b275959b5705

Fuse.pm
Fuse.xs
META.yml

diff --git a/Fuse.pm b/Fuse.pm
index 610d720..71581a5 100644 (file)
--- a/Fuse.pm
+++ b/Fuse.pm
@@ -28,7 +28,7 @@ our %EXPORT_TAGS = (
 our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
 
 our @EXPORT = ();
-our $VERSION = '0.07_1';
+our $VERSION = '0.07_2';
 
 sub AUTOLOAD {
     # This AUTOLOAD is used to 'autoload' constants from the constant()
diff --git a/Fuse.xs b/Fuse.xs
index cbbc80c..1efe6db 100644 (file)
--- a/Fuse.xs
+++ b/Fuse.xs
@@ -541,7 +541,8 @@ int _PLfuse_write (const char *file, const char *buf, size_t buflen, off_t off)
        return rv;
 }
 
-int _PLfuse_statfs (const char *file, struct statfs *st) {
+/* FIXME check for old fuse API (< 21?) and use statfs here */
+int _PLfuse_statfs (const char *file, struct statvfs *st) {
        int rv;
        char *rvstr;
        FUSE_CONTEXT_PRE;
@@ -555,11 +556,16 @@ int _PLfuse_statfs (const char *file, struct statfs *st) {
        SPAGAIN;
        if(rv > 5) {
                st->f_bsize    = POPi;
-               st->f_bfree    = POPi;
+               st->f_bfree = st->f_bavail = POPi;
                st->f_blocks   = POPi;
-               st->f_ffree    = POPi;
+               st->f_ffree = st->f_favail  = POPi;
                st->f_files    = POPi;
-               st->f_namelen  = POPi;
+               st->f_namemax  = POPi;
+               /* zero all other */
+               st->f_frsize = 4096;
+               st->f_fsid = 0;
+               st->f_flag = 0;
+
                if(rv > 6)
                        rv = POPi;
                else
index 63d6550..a9883ed 100644 (file)
--- a/META.yml
+++ b/META.yml
@@ -1,7 +1,7 @@
 # http://module-build.sourceforge.net/META-spec.html
 #XXXXXXX This is a prototype!!!  It will change in the future!!! XXXXX#
 name:         Fuse
-version:      0.07_1
+version:      0.07_2
 version_from: Fuse.pm
 installdirs:  site
 requires: