/[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 15 by richdawe, Sun Apr 10 13:30:11 2005 UTC revision 16 by dpavlin, Wed Jun 22 16:15:17 2005 UTC
# Line 777  perl_fuse_main(...) Line 777  perl_fuse_main(...)
777          struct fuse_operations fops = {NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL};          struct fuse_operations fops = {NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL};
778          int i, fd, varnum = 0, debug, have_mnt;          int i, fd, varnum = 0, debug, have_mnt;
779          char *mountpoint;          char *mountpoint;
780            char *mountopts;
781          STRLEN n_a;          STRLEN n_a;
782          STRLEN l;          STRLEN l;
783          INIT:          INIT:
784          if(items != 27) {          if(items != 28) {
785                  fprintf(stderr,"Perl<->C inconsistency or internal error\n");                  fprintf(stderr,"Perl<->C inconsistency or internal error\n");
786                  XSRETURN_UNDEF;                  XSRETURN_UNDEF;
787          }          }
788          CODE:          CODE:
789          debug = SvIV(ST(0));          debug = SvIV(ST(0));
790          mountpoint = SvPV_nolen(ST(1));          mountpoint = SvPV_nolen(ST(1));
791            mountopts = SvPV_nolen(ST(2));
792          /* FIXME: reevaluate multithreading support when perl6 arrives */          /* FIXME: reevaluate multithreading support when perl6 arrives */
793          for(i=0;i<N_CALLBACKS;i++) {          for(i=0;i<N_CALLBACKS;i++) {
794                  SV *var = ST(i+2);                  SV *var = ST(i+3);
795                  if((var != &PL_sv_undef) && SvROK(var)) {                  if((var != &PL_sv_undef) && SvROK(var)) {
796                          if(SvTYPE(SvRV(var)) == SVt_PVCV) {                          if(SvTYPE(SvRV(var)) == SVt_PVCV) {
797                                  void **tmp1 = (void**)&_available_ops, **tmp2 = (void**)&fops;                                  void **tmp1 = (void**)&_available_ops, **tmp2 = (void**)&fops;
# Line 800  perl_fuse_main(...) Line 802  perl_fuse_main(...)
802                  }                  }
803          }          }
804          /* FIXME: need to pass fusermount arguments */          /* FIXME: need to pass fusermount arguments */
805          fd = fuse_mount(mountpoint,NULL);          fd = fuse_mount(mountpoint,mountopts);
806          if(fd < 0)          if(fd < 0)
807                  croak("could not mount fuse filesystem!");                  croak("could not mount fuse filesystem!");
808          fuse_loop(fuse_new(fd,debug ? "debug" : NULL,&fops));          fuse_loop(fuse_new(fd,debug ? "debug" : NULL,&fops));

Legend:
Removed from v.15  
changed lines
  Added in v.16

  ViewVC Help
Powered by ViewVC 1.1.26