Subject: | Special Filesystems not identified correctly in Linux |
Special Filesystems are not identified correctly on Linux. For example,
the example code below identifies /sys as a regular filesystem.
The problem appears to be caused by a typo on line 139 of
lib/Sys/Filesystem/Unix.pm. I suspect that this issue affects other
flavours of unix, however, I'm currently unable to test that.
A patch file which fixes the problem has been attached.
Example code follows:
use Sys::Filesystem;
my $fsh = Sys::Filesystem->new;
if ($fsh->special("/sys")) {
print "/sys is special\n";
} else {
print "/sys is not special\n";
}
Subject: | Sys-Filesystem-1.27-special-fix.patch |
diff -c -r Sys-Filesystem-1.27/lib/Sys/Filesystem/Unix.pm Sys-Filesystem-mod/lib/Sys/Filesystem/Unix.pm
*** Sys-Filesystem-1.27/lib/Sys/Filesystem/Unix.pm 2010-02-20 07:05:07.000000000 -0500
--- Sys-Filesystem-mod/lib/Sys/Filesystem/Unix.pm 2010-04-12 01:15:33.847586426 -0400
***************
*** 134,142 ****
if ( defined( $pridx->[2] ) )
{
! my $vfs_type;
! $vfs_type = $self->{ $vals[ $pridx->[1] ] }->{fs_vfstype} = $vals[ $pridx->[2] ];
! $self->{ $vals[ $pridx->[1] ] }->{special} = 1 if ( defined( $special_fs->{vfs_types} ) );
}
else
{
--- 134,141 ----
if ( defined( $pridx->[2] ) )
{
! my $vfs_type = $self->{ $vals[ $pridx->[1] ] }->{fs_vfstype} = $vals[ $pridx->[2] ];
! $self->{ $vals[ $pridx->[1] ] }->{special} = 1 if ( defined( $special_fs->{$vfs_type} ) );
}
else
{