/[fuse.before_github]/perl-llin/examples/loopback.pl
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/examples/loopback.pl

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

revision 21 by dpavlin, Mon Jan 2 19:50:33 2006 UTC revision 23 by dpavlin, Mon Jan 2 20:31:19 2006 UTC
# Line 1  Line 1 
1  #!/usr/bin/perl -w  #!/usr/bin/perl -w
2  use strict;  use strict;
3    
4    use blib;
5  use Fuse;  use Fuse;
6  use IO::File;  use IO::File;
7  use POSIX qw(ENOENT ENOSYS EEXIST EPERM O_RDONLY O_RDWR O_APPEND O_CREAT);  use POSIX qw(ENOENT ENOSYS EEXIST EPERM O_RDONLY O_RDWR O_APPEND O_CREAT);
8  use Fcntl qw(S_ISBLK S_ISCHR S_ISFIFO SEEK_SET);  use Fcntl qw(S_ISBLK S_ISCHR S_ISFIFO SEEK_SET);
9  require 'syscall.ph'; # for SYS_mknod and SYS_lchown  require 'syscall.ph'; # for SYS_mknod and SYS_lchown
10    
11  sub fixup { return "/tmp/fusetest-" . $ENV{LOGNAME} . shift }  my $tmp_path = "/tmp/fusetest-" . $ENV{LOGNAME};
12    if (! -e $tmp_path) {
13            mkdir($tmp_path) || die "can't create $tmp_path: $!";
14    }
15    
16    sub fixup { return $tmp_path . shift }
17    
18  sub x_getattr {  sub x_getattr {
19          my ($file) = fixup(shift);          my ($file) = fixup(shift);
# Line 133  Fuse::main( Line 139  Fuse::main(
139          write   =>"main::x_write",          write   =>"main::x_write",
140          statfs  =>"main::x_statfs",          statfs  =>"main::x_statfs",
141          threaded=>0,          threaded=>0,
142            debug => 1,
143  );  );

Legend:
Removed from v.21  
changed lines
  Added in v.23

  ViewVC Help
Powered by ViewVC 1.1.26