aboutsummaryrefslogtreecommitdiffstats
path: root/support
diff options
context:
space:
mode:
authorWayne Davison <wayned@samba.org>2005-01-22 08:11:43 +0000
committerWayne Davison <wayned@samba.org>2005-01-22 08:11:43 +0000
commit3d54c6ec464c7f192ac3377165cbc7068108edd5 (patch)
tree6b7b8c55dbfaf9bdcb70c334a7bcd344e95d8d07 /support
parent71e27c463d286ebf75a63533ad3701d79b9ba1d3 (diff)
downloadandroid_external_rsync-3d54c6ec464c7f192ac3377165cbc7068108edd5.tar.gz
android_external_rsync-3d54c6ec464c7f192ac3377165cbc7068108edd5.tar.bz2
android_external_rsync-3d54c6ec464c7f192ac3377165cbc7068108edd5.zip
Moved the /proc/mounts literal string nearer to the top.
Diffstat (limited to 'support')
-rwxr-xr-xsupport/mnt-excl3
1 files changed, 2 insertions, 1 deletions
diff --git a/support/mnt-excl b/support/mnt-excl
index 993180eb..63d0ad9b 100755
--- a/support/mnt-excl
+++ b/support/mnt-excl
@@ -20,6 +20,7 @@
use strict;
use Cwd 'abs_path';
+my $file = '/proc/mounts';
my $dir = shift || '/';
$dir = abs_path($dir);
$dir =~ s#([^/]*)$##;
@@ -27,7 +28,7 @@ my $trailing = $1;
$trailing = '' if $trailing eq '.' || !-d "$dir$trailing";
$trailing .= '/' if $trailing ne '';
-open(IN, '/proc/mounts') or die $!;
+open(IN, $file) or die "Unable to open $file: $!\n";
while (<IN>) {
$_ = (split)[1];
next unless s#^\Q$dir$trailing\E##o && $_ ne '';