From 3d54c6ec464c7f192ac3377165cbc7068108edd5 Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Sat, 22 Jan 2005 08:11:43 +0000 Subject: [PATCH] Moved the /proc/mounts literal string nearer to the top. --- support/mnt-excl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 () { $_ = (split)[1]; next unless s#^\Q$dir$trailing\E##o && $_ ne ''; -- 2.34.1