/[fuse.before_github]/perl/trunk/Fuse.xs
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /perl/trunk/Fuse.xs

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 19 by dpavlin, Tue Dec 27 12:47:00 2005 UTC revision 48 by dpavlin, Mon Jan 2 22:52:22 2006 UTC
# Line 30  static inline void create_perl_context() Line 30  static inline void create_perl_context()
30  #include <fuse/fuse.h>  #include <fuse/fuse.h>
31    
32  #undef DEBUGf  #undef DEBUGf
33  #if 0  #if 1
34  #define DEBUGf(f, a...) fprintf(stderr, "%s:%d (%i): " f,__BASE_FILE__,__LINE__,sp-PL_stack_base ,##a )  #define DEBUGf(f, a...) fprintf(stderr, "%s:%d (%i): " f,__BASE_FILE__,__LINE__,sp-PL_stack_base ,##a )
35  #else  #else
36  #define DEBUGf(a...)  #define DEBUGf(a...)
# Line 541  int _PLfuse_write (const char *file, con Line 541  int _PLfuse_write (const char *file, con
541          return rv;          return rv;
542  }  }
543    
544  int _PLfuse_statfs (const char *file, struct statfs *st) {  /* FIXME check for old fuse API (< 21?) and use statfs here */
545    int _PLfuse_statfs (const char *file, struct statvfs *st) {
546          int rv;          int rv;
547          char *rvstr;          char *rvstr;
548          FUSE_CONTEXT_PRE;          FUSE_CONTEXT_PRE;
# Line 553  int _PLfuse_statfs (const char *file, st Line 554  int _PLfuse_statfs (const char *file, st
554          PUTBACK;          PUTBACK;
555          rv = call_sv(_PLfuse_callbacks[17],G_ARRAY);          rv = call_sv(_PLfuse_callbacks[17],G_ARRAY);
556          SPAGAIN;          SPAGAIN;
557          if(rv > 5) {          DEBUGf("statfs got %i params\n",rv);
558            if(rv == 6 || rv == 7) {
559                  st->f_bsize    = POPi;                  st->f_bsize    = POPi;
560                  st->f_bfree    = POPi;                  st->f_bfree = st->f_bavail = POPi;
561                  st->f_blocks   = POPi;                  st->f_blocks   = POPi;
562                  st->f_ffree    = POPi;                  st->f_ffree = st->f_favail  = POPi;
563                  st->f_files    = POPi;                  st->f_files    = POPi;
564                  st->f_namelen  = POPi;                  st->f_namemax  = POPi;
565                  if(rv > 6)                  /* zero all other */
566                    st->f_frsize = 4096;
567                    st->f_fsid = 0;
568                    st->f_flag = 0;
569    
570                    if(rv == 7)
571                          rv = POPi;                          rv = POPi;
572                  else                  else
573                          rv = 0;                          rv = 0;

Legend:
Removed from v.19  
changed lines
  Added in v.48

  ViewVC Help
Powered by ViewVC 1.1.26