aboutsummaryrefslogtreecommitdiffstats
path: root/perl/loopback.pl
diff options
context:
space:
mode:
authorMark Glines <mark@glines.org>2002-04-22 02:24:28 +0000
committerMark Glines <mark@glines.org>2002-04-22 02:24:28 +0000
commit8811161f67657253d11214ede54857f810662a91 (patch)
tree1f555243af88b77fcea3d256f6f7b8b5f1c05548 /perl/loopback.pl
parent7574b0559706597058a9cb3c056204935f9b00c5 (diff)
downloadlibfuse-8811161f67657253d11214ede54857f810662a91.tar.gz
added a test framework
updated README fixed a couple of bugs in loopback.pl
Diffstat (limited to 'perl/loopback.pl')
-rw-r--r--perl/loopback.pl6
1 files changed, 3 insertions, 3 deletions
diff --git a/perl/loopback.pl b/perl/loopback.pl
index 3aaf6be..206eb81 100644
--- a/perl/loopback.pl
+++ b/perl/loopback.pl
@@ -7,7 +7,7 @@ use POSIX qw(ENOENT ENOSYS EEXIST EPERM O_RDONLY O_RDWR O_APPEND O_CREAT);
use Fcntl qw(S_ISBLK S_ISCHR S_ISFIFO SEEK_SET);
require 'syscall.ph'; # for SYS_mknod
-sub fixup { return "/tmp/test" . shift }
+sub fixup { return "/tmp/fusetest" . shift }
sub x_getattr {
my ($file) = fixup(shift);
@@ -75,7 +75,7 @@ sub x_rename {
my ($err) = rename($old,$new) ? 0 : -ENOENT();
return $err;
}
-sub x_link { return err(link(fixup(shift),fixup(shift)) ); }
+sub x_link { return link(fixup(shift),fixup(shift)) ? 0 : -$! }
sub x_chown {
my ($fn) = fixup(shift);
my ($uid,$gid) = @_;
@@ -100,7 +100,7 @@ sub x_mknod {
my ($file, $modes, $dev) = @_;
$file = fixup($file);
$! = 0;
- syscall(&SYS_mknod,$file,$modes);
+ syscall(&SYS_mknod,$file,$modes,$dev);
return -$!;
}