/[fuse.before_github]/perl-llin/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-llin/Fuse.xs

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

revision 28 by dpavlin, Mon Jan 2 22:39:32 2006 UTC revision 68 by dpavlin, Tue Jan 3 16:21:13 2006 UTC
# Line 542  int _PLfuse_write (const char *file, con Line 542  int _PLfuse_write (const char *file, con
542  }  }
543    
544  /* FIXME check for old fuse API (< 21?) and use statfs here */  /* FIXME check for old fuse API (< 21?) and use statfs here */
545  int _PLfuse_statfs (const char *file, struct statvfs *st) {  #ifdef __FreeBSD__
546     #define _fuse_statvfs statfs
547    #else
548     #define _fuse_statvfs statvfs
549    #endif
550    int _PLfuse_statfs (const char *file, struct _fuse_statvfs *st) {
551    
552          int rv;          int rv;
553          char *rvstr;          char *rvstr;
554          FUSE_CONTEXT_PRE;          FUSE_CONTEXT_PRE;
# Line 556  int _PLfuse_statfs (const char *file, st Line 562  int _PLfuse_statfs (const char *file, st
562          SPAGAIN;          SPAGAIN;
563          DEBUGf("statfs got %i params\n",rv);          DEBUGf("statfs got %i params\n",rv);
564          if(rv == 6 || rv == 7) {          if(rv == 6 || rv == 7) {
565                  st->f_bsize    = POPi;                  st->f_bsize     = POPi;
566                  st->f_bfree = st->f_bavail = POPi;                  st->f_bfree     = POPi;
567                  st->f_blocks   = POPi;                  st->f_blocks    = POPi;
568                  st->f_ffree = st->f_favail  = POPi;                  st->f_ffree     = POPi;
569                  st->f_files    = POPi;                  st->f_files     = POPi;
570                  st->f_namemax  = POPi;                  st->f_namemax   = POPi;
571                  /* zero all other */  #ifndef __FreeBSD__
572                  st->f_frsize = 4096;                  /* zero and fill-in other */
573                  st->f_fsid = 0;                  st->f_fsid = 0;
574                    st->f_frsize = 4096;
575                  st->f_flag = 0;                  st->f_flag = 0;
576                    st->f_bavail = st->f_bfree;
577                    st->f_favail = st->f_ffree;
578    #endif
579    
580                  if(rv == 7)                  if(rv == 7)
581                          rv = POPi;                          rv = POPi;

Legend:
Removed from v.28  
changed lines
  Added in v.68

  ViewVC Help
Powered by ViewVC 1.1.26