summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/gendevices
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2012-04-01 07:19:52 +0000
committerChristopher Faylor <me@cgf.cx>2012-04-01 07:19:52 +0000
commit727a81f4d93f3715d3692685915f99fca5106a8a (patch)
treeafe283f0a204fab15bf8a3caf96b107f0f177fa4 /winsup/cygwin/gendevices
parente2e887c5aca1e3413b614fb46bb766d6be2283bf (diff)
downloadcygnal-727a81f4d93f3715d3692685915f99fca5106a8a.tar.gz
cygnal-727a81f4d93f3715d3692685915f99fca5106a8a.tar.bz2
cygnal-727a81f4d93f3715d3692685915f99fca5106a8a.zip
* devices.h (device::exists_func): Redefine field.
(device::dev_on_fs): Remove unneeded bit field. Just make a normal boolean. (device::exists): Redefine function. * devices.in: Move previous functions earlier since they are now only defined static. Rename some functions due to an as-yet unresolved bug in gendevices. Rename posix part of internal-only devices with a double-slash. gendevices will eventuall translate that to a ":". (device::parse): Rework to use dev pointer and dev_storage_end. * devices.cc: Regenerate. * gendevices: Translate "// to ": after shilka processing.
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;
}