summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/gendevices
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/gendevices')
-rwxr-xr-xwinsup/cygwin/gendevices5
1 files changed, 4 insertions, 1 deletions
diff --git a/winsup/cygwin/gendevices b/winsup/cygwin/gendevices
index 2c4dbcbe2..fde4a43ee 100755
--- a/winsup/cygwin/gendevices
+++ b/winsup/cygwin/gendevices
@@ -70,7 +70,7 @@ if ($? == -1) {
}
chdir $cwd;
unlink $shilka;
-open(C, $c) or die "$0: couldn't open $c - $!\n";
+open(C, '<', $c) or die "$0: couldn't open $c - $!\n";
@lines = <C>;
close C;
unlink $c;
@@ -84,6 +84,7 @@ for (my $i = 0; $i < @lines; $i++) {
splice(@lines, $i, 1);
redo;
};
+ $lines[$i] =~ s%"//%":%go;
}
open(OUTPUT, '>', $output) or do {{
if (chmod(0664, $output)) {
@@ -155,5 +156,7 @@ sub devsort {
my $b0 = $b->[0];
$a0 =~ s/(\D)(\d+)/"$1" . sprintf "%05d", $2/e;
$b0 =~ s/(\D)(\d+)/"$1" . sprintf "%05d", $2/e;
+ $a0 =~ s%^//%:%o;
+ $b0 =~ s%^//%:%o;
return $a0 cmp $b0;
}