git.samba.org
/
rsync.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
71e27c4
)
Moved the /proc/mounts literal string nearer to the top.
author
Wayne Davison
<wayned@samba.org>
Sat, 22 Jan 2005 08:11:43 +0000
(08:11 +0000)
committer
Wayne Davison
<wayned@samba.org>
Sat, 22 Jan 2005 08:11:43 +0000
(08:11 +0000)
support/mnt-excl
patch
|
blob
|
history
diff --git
a/support/mnt-excl
b/support/mnt-excl
index 993180ebdd0be822adbb64de95aa7926e6ceec59..63d0ad9b4f082806cf619a76a6adbdf2e2330ad9 100755
(executable)
--- 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 '';