81 |
my (@names) = qw(getattr readlink getdir mknod mkdir unlink rmdir symlink |
my (@names) = qw(getattr readlink getdir mknod mkdir unlink rmdir symlink |
82 |
rename link chmod chown truncate utime open read write statfs |
rename link chmod chown truncate utime open read write statfs |
83 |
flush release fsync setxattr getxattr listxattr removexattr); |
flush release fsync setxattr getxattr listxattr removexattr); |
84 |
|
my (@validOpts) = qw(allow_other); |
85 |
my ($tmp) = 0; |
my ($tmp) = 0; |
86 |
my (%mapping) = map { $_ => $tmp++ } (@names); |
my (%mapping) = map { $_ => $tmp++ } (@names); |
87 |
my (%otherargs) = (debug=>0, mountpoint=>""); |
my (%optmap) = map { $_ => 1 } (@validOpts); |
88 |
|
my (%otherargs) = (debug=>0, mountpoint=>"", mountopts=>""); |
89 |
while(my $name = shift) { |
while(my $name = shift) { |
90 |
my ($subref) = shift; |
my ($subref) = shift; |
91 |
if(exists($otherargs{$name})) { |
if(exists($otherargs{$name})) { |
98 |
$subs[$mapping{$name}] = $subref; |
$subs[$mapping{$name}] = $subref; |
99 |
} |
} |
100 |
} |
} |
101 |
perl_fuse_main($otherargs{debug},$otherargs{mountpoint},@subs); |
foreach my $opt ( split(/,/,$otherargs{mountopts}) ) { |
102 |
|
if ( ! exists($optmap{$opt}) ) { |
103 |
|
croak "Use of an invalid mountopt argument"; |
104 |
|
} |
105 |
|
} |
106 |
|
perl_fuse_main($otherargs{debug},$otherargs{mountpoint},$otherargs{mountopts},@subs); |
107 |
} |
} |
108 |
|
|
109 |
# Autoload methods go after =cut, and are processed by the autosplit program. |
# Autoload methods go after =cut, and are processed by the autosplit program. |
181 |
|
|
182 |
=back |
=back |
183 |
|
|
184 |
|
mountopts => string |
185 |
|
|
186 |
|
=over 1 |
187 |
|
|
188 |
|
This is a comma seperated list of mount options to pass to the FUSE kernel |
189 |
|
module. |
190 |
|
|
191 |
|
At present, it allows the specification of the allow_other |
192 |
|
argument when mounting the new FUSE filesystem. To use this, you will also |
193 |
|
need 'user_allow_other' in /etc/fuse.conf as per the FUSE documention |
194 |
|
|
195 |
|
mountopts => "allow_other" or |
196 |
|
mountopts => "" |
197 |
|
|
198 |
|
=back |
199 |
|
|
200 |
unthreaded => boolean |
unthreaded => boolean |
201 |
|
|
202 |
=over 1 |
=over 1 |