* devices.in: Change native device name to native NT device name for
/dev/null, /dev/comX and /dev/ttySx. * devices.cc: Regenerate. * fhandler.cc (fhandler_base::open_9x): Remove. (fhandler_base::open): Don't test for DOS device name, don't call open_9x. (fhandler_dev_null::open): Remove. * fhandler.h (class fhandler_base): Drop open_9x declaration. (class fhandler_dev_null): Drop open declaration.
This commit is contained in:
parent
b5cb5c9e64
commit
296a8a6369
|
@ -1,3 +1,15 @@
|
|||
2007-02-23 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
* devices.in: Change native device name to native NT device name for
|
||||
/dev/null, /dev/comX and /dev/ttySx.
|
||||
* devices.cc: Regenerate.
|
||||
* fhandler.cc (fhandler_base::open_9x): Remove.
|
||||
(fhandler_base::open): Don't test for DOS device name, don't call
|
||||
open_9x.
|
||||
(fhandler_dev_null::open): Remove.
|
||||
* fhandler.h (class fhandler_base): Drop open_9x declaration.
|
||||
(class fhandler_dev_null): Drop open declaration.
|
||||
|
||||
2007-02-23 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
* fhandler_console.cc (fhandler_console::need_invisible): Drop
|
||||
|
|
|
@ -65,22 +65,22 @@ static const device dev_storage[] =
|
|||
{
|
||||
{"/dev", BRACK(FH_DEV), "/dev"},
|
||||
{"/dev/clipboard", BRACK(FH_CLIPBOARD), "\\dev\\clipboard"},
|
||||
{"/dev/com1", BRACK(FHDEV(DEV_SERIAL_MAJOR, 1)), "\\\\.\\com1"},
|
||||
{"/dev/com2", BRACK(FHDEV(DEV_SERIAL_MAJOR, 2)), "\\\\.\\com2"},
|
||||
{"/dev/com3", BRACK(FHDEV(DEV_SERIAL_MAJOR, 3)), "\\\\.\\com3"},
|
||||
{"/dev/com4", BRACK(FHDEV(DEV_SERIAL_MAJOR, 4)), "\\\\.\\com4"},
|
||||
{"/dev/com5", BRACK(FHDEV(DEV_SERIAL_MAJOR, 5)), "\\\\.\\com5"},
|
||||
{"/dev/com6", BRACK(FHDEV(DEV_SERIAL_MAJOR, 6)), "\\\\.\\com6"},
|
||||
{"/dev/com7", BRACK(FHDEV(DEV_SERIAL_MAJOR, 7)), "\\\\.\\com7"},
|
||||
{"/dev/com8", BRACK(FHDEV(DEV_SERIAL_MAJOR, 8)), "\\\\.\\com8"},
|
||||
{"/dev/com9", BRACK(FHDEV(DEV_SERIAL_MAJOR, 9)), "\\\\.\\com9"},
|
||||
{"/dev/com10", BRACK(FHDEV(DEV_SERIAL_MAJOR, 10)), "\\\\.\\com10"},
|
||||
{"/dev/com11", BRACK(FHDEV(DEV_SERIAL_MAJOR, 11)), "\\\\.\\com11"},
|
||||
{"/dev/com12", BRACK(FHDEV(DEV_SERIAL_MAJOR, 12)), "\\\\.\\com12"},
|
||||
{"/dev/com13", BRACK(FHDEV(DEV_SERIAL_MAJOR, 13)), "\\\\.\\com13"},
|
||||
{"/dev/com14", BRACK(FHDEV(DEV_SERIAL_MAJOR, 14)), "\\\\.\\com14"},
|
||||
{"/dev/com15", BRACK(FHDEV(DEV_SERIAL_MAJOR, 15)), "\\\\.\\com15"},
|
||||
{"/dev/com16", BRACK(FHDEV(DEV_SERIAL_MAJOR, 16)), "\\\\.\\com16"},
|
||||
{"/dev/com1", BRACK(FHDEV(DEV_SERIAL_MAJOR, 0)), "\\Device\\Serial0"},
|
||||
{"/dev/com2", BRACK(FHDEV(DEV_SERIAL_MAJOR, 1)), "\\Device\\Serial1"},
|
||||
{"/dev/com3", BRACK(FHDEV(DEV_SERIAL_MAJOR, 2)), "\\Device\\Serial2"},
|
||||
{"/dev/com4", BRACK(FHDEV(DEV_SERIAL_MAJOR, 3)), "\\Device\\Serial3"},
|
||||
{"/dev/com5", BRACK(FHDEV(DEV_SERIAL_MAJOR, 4)), "\\Device\\Serial4"},
|
||||
{"/dev/com6", BRACK(FHDEV(DEV_SERIAL_MAJOR, 5)), "\\Device\\Serial5"},
|
||||
{"/dev/com7", BRACK(FHDEV(DEV_SERIAL_MAJOR, 6)), "\\Device\\Serial6"},
|
||||
{"/dev/com8", BRACK(FHDEV(DEV_SERIAL_MAJOR, 7)), "\\Device\\Serial7"},
|
||||
{"/dev/com9", BRACK(FHDEV(DEV_SERIAL_MAJOR, 8)), "\\Device\\Serial8"},
|
||||
{"/dev/com10", BRACK(FHDEV(DEV_SERIAL_MAJOR, 9)), "\\Device\\Serial9"},
|
||||
{"/dev/com11", BRACK(FHDEV(DEV_SERIAL_MAJOR, 10)), "\\Device\\Serial10"},
|
||||
{"/dev/com12", BRACK(FHDEV(DEV_SERIAL_MAJOR, 11)), "\\Device\\Serial11"},
|
||||
{"/dev/com13", BRACK(FHDEV(DEV_SERIAL_MAJOR, 12)), "\\Device\\Serial12"},
|
||||
{"/dev/com14", BRACK(FHDEV(DEV_SERIAL_MAJOR, 13)), "\\Device\\Serial13"},
|
||||
{"/dev/com15", BRACK(FHDEV(DEV_SERIAL_MAJOR, 14)), "\\Device\\Serial14"},
|
||||
{"/dev/com16", BRACK(FHDEV(DEV_SERIAL_MAJOR, 15)), "\\Device\\Serial15"},
|
||||
{"/dev/conin", BRACK(FH_CONIN), "conin"},
|
||||
{"/dev/conout", BRACK(FH_CONOUT), "conout"},
|
||||
{"/dev/console", BRACK(FH_CONSOLE), "\\dev\\console"},
|
||||
|
@ -234,7 +234,7 @@ static const device dev_storage[] =
|
|||
{"/dev/nst125", BRACK(FHDEV(DEV_TAPE_MAJOR, 253)), "\\Device\\Tape125"},
|
||||
{"/dev/nst126", BRACK(FHDEV(DEV_TAPE_MAJOR, 254)), "\\Device\\Tape126"},
|
||||
{"/dev/nst127", BRACK(FHDEV(DEV_TAPE_MAJOR, 255)), "\\Device\\Tape127"},
|
||||
{"/dev/null", BRACK(FH_NULL), "nul"},
|
||||
{"/dev/null", BRACK(FH_NULL), "\\Device\\Null"},
|
||||
{"/dev/pipe", BRACK(FH_PIPE), "\\dev\\pipe"},
|
||||
{"/dev/port", BRACK(FH_PORT), "\\dev\\port"},
|
||||
{"/dev/ptmx", BRACK(FH_PTYM), "\\dev\\ptmx"},
|
||||
|
@ -2512,70 +2512,70 @@ static const device dev_storage[] =
|
|||
{"/dev/tty61", BRACK(FHDEV(DEV_TTYS_MAJOR, 61)), "\\dev\\tty61"},
|
||||
{"/dev/tty62", BRACK(FHDEV(DEV_TTYS_MAJOR, 62)), "\\dev\\tty62"},
|
||||
{"/dev/tty63", BRACK(FHDEV(DEV_TTYS_MAJOR, 63)), "\\dev\\tty63"},
|
||||
{"/dev/ttyS0", BRACK(FHDEV(DEV_SERIAL_MAJOR, 1)), "\\\\.\\com1"},
|
||||
{"/dev/ttyS1", BRACK(FHDEV(DEV_SERIAL_MAJOR, 2)), "\\\\.\\com2"},
|
||||
{"/dev/ttyS2", BRACK(FHDEV(DEV_SERIAL_MAJOR, 3)), "\\\\.\\com3"},
|
||||
{"/dev/ttyS3", BRACK(FHDEV(DEV_SERIAL_MAJOR, 4)), "\\\\.\\com4"},
|
||||
{"/dev/ttyS4", BRACK(FHDEV(DEV_SERIAL_MAJOR, 5)), "\\\\.\\com5"},
|
||||
{"/dev/ttyS5", BRACK(FHDEV(DEV_SERIAL_MAJOR, 6)), "\\\\.\\com6"},
|
||||
{"/dev/ttyS6", BRACK(FHDEV(DEV_SERIAL_MAJOR, 7)), "\\\\.\\com7"},
|
||||
{"/dev/ttyS7", BRACK(FHDEV(DEV_SERIAL_MAJOR, 8)), "\\\\.\\com8"},
|
||||
{"/dev/ttyS8", BRACK(FHDEV(DEV_SERIAL_MAJOR, 9)), "\\\\.\\com9"},
|
||||
{"/dev/ttyS9", BRACK(FHDEV(DEV_SERIAL_MAJOR, 10)), "\\\\.\\com10"},
|
||||
{"/dev/ttyS10", BRACK(FHDEV(DEV_SERIAL_MAJOR, 11)), "\\\\.\\com11"},
|
||||
{"/dev/ttyS11", BRACK(FHDEV(DEV_SERIAL_MAJOR, 12)), "\\\\.\\com12"},
|
||||
{"/dev/ttyS12", BRACK(FHDEV(DEV_SERIAL_MAJOR, 13)), "\\\\.\\com13"},
|
||||
{"/dev/ttyS13", BRACK(FHDEV(DEV_SERIAL_MAJOR, 14)), "\\\\.\\com14"},
|
||||
{"/dev/ttyS14", BRACK(FHDEV(DEV_SERIAL_MAJOR, 15)), "\\\\.\\com15"},
|
||||
{"/dev/ttyS15", BRACK(FHDEV(DEV_SERIAL_MAJOR, 16)), "\\\\.\\com16"},
|
||||
{"/dev/ttyS16", BRACK(FHDEV(DEV_SERIAL_MAJOR, 17)), "\\\\.\\com17"},
|
||||
{"/dev/ttyS17", BRACK(FHDEV(DEV_SERIAL_MAJOR, 18)), "\\\\.\\com18"},
|
||||
{"/dev/ttyS18", BRACK(FHDEV(DEV_SERIAL_MAJOR, 19)), "\\\\.\\com19"},
|
||||
{"/dev/ttyS19", BRACK(FHDEV(DEV_SERIAL_MAJOR, 20)), "\\\\.\\com20"},
|
||||
{"/dev/ttyS20", BRACK(FHDEV(DEV_SERIAL_MAJOR, 21)), "\\\\.\\com21"},
|
||||
{"/dev/ttyS21", BRACK(FHDEV(DEV_SERIAL_MAJOR, 22)), "\\\\.\\com22"},
|
||||
{"/dev/ttyS22", BRACK(FHDEV(DEV_SERIAL_MAJOR, 23)), "\\\\.\\com23"},
|
||||
{"/dev/ttyS23", BRACK(FHDEV(DEV_SERIAL_MAJOR, 24)), "\\\\.\\com24"},
|
||||
{"/dev/ttyS24", BRACK(FHDEV(DEV_SERIAL_MAJOR, 25)), "\\\\.\\com25"},
|
||||
{"/dev/ttyS25", BRACK(FHDEV(DEV_SERIAL_MAJOR, 26)), "\\\\.\\com26"},
|
||||
{"/dev/ttyS26", BRACK(FHDEV(DEV_SERIAL_MAJOR, 27)), "\\\\.\\com27"},
|
||||
{"/dev/ttyS27", BRACK(FHDEV(DEV_SERIAL_MAJOR, 28)), "\\\\.\\com28"},
|
||||
{"/dev/ttyS28", BRACK(FHDEV(DEV_SERIAL_MAJOR, 29)), "\\\\.\\com29"},
|
||||
{"/dev/ttyS29", BRACK(FHDEV(DEV_SERIAL_MAJOR, 30)), "\\\\.\\com30"},
|
||||
{"/dev/ttyS30", BRACK(FHDEV(DEV_SERIAL_MAJOR, 31)), "\\\\.\\com31"},
|
||||
{"/dev/ttyS31", BRACK(FHDEV(DEV_SERIAL_MAJOR, 32)), "\\\\.\\com32"},
|
||||
{"/dev/ttyS32", BRACK(FHDEV(DEV_SERIAL_MAJOR, 33)), "\\\\.\\com33"},
|
||||
{"/dev/ttyS33", BRACK(FHDEV(DEV_SERIAL_MAJOR, 34)), "\\\\.\\com34"},
|
||||
{"/dev/ttyS34", BRACK(FHDEV(DEV_SERIAL_MAJOR, 35)), "\\\\.\\com35"},
|
||||
{"/dev/ttyS35", BRACK(FHDEV(DEV_SERIAL_MAJOR, 36)), "\\\\.\\com36"},
|
||||
{"/dev/ttyS36", BRACK(FHDEV(DEV_SERIAL_MAJOR, 37)), "\\\\.\\com37"},
|
||||
{"/dev/ttyS37", BRACK(FHDEV(DEV_SERIAL_MAJOR, 38)), "\\\\.\\com38"},
|
||||
{"/dev/ttyS38", BRACK(FHDEV(DEV_SERIAL_MAJOR, 39)), "\\\\.\\com39"},
|
||||
{"/dev/ttyS39", BRACK(FHDEV(DEV_SERIAL_MAJOR, 40)), "\\\\.\\com40"},
|
||||
{"/dev/ttyS40", BRACK(FHDEV(DEV_SERIAL_MAJOR, 41)), "\\\\.\\com41"},
|
||||
{"/dev/ttyS41", BRACK(FHDEV(DEV_SERIAL_MAJOR, 42)), "\\\\.\\com42"},
|
||||
{"/dev/ttyS42", BRACK(FHDEV(DEV_SERIAL_MAJOR, 43)), "\\\\.\\com43"},
|
||||
{"/dev/ttyS43", BRACK(FHDEV(DEV_SERIAL_MAJOR, 44)), "\\\\.\\com44"},
|
||||
{"/dev/ttyS44", BRACK(FHDEV(DEV_SERIAL_MAJOR, 45)), "\\\\.\\com45"},
|
||||
{"/dev/ttyS45", BRACK(FHDEV(DEV_SERIAL_MAJOR, 46)), "\\\\.\\com46"},
|
||||
{"/dev/ttyS46", BRACK(FHDEV(DEV_SERIAL_MAJOR, 47)), "\\\\.\\com47"},
|
||||
{"/dev/ttyS47", BRACK(FHDEV(DEV_SERIAL_MAJOR, 48)), "\\\\.\\com48"},
|
||||
{"/dev/ttyS48", BRACK(FHDEV(DEV_SERIAL_MAJOR, 49)), "\\\\.\\com49"},
|
||||
{"/dev/ttyS49", BRACK(FHDEV(DEV_SERIAL_MAJOR, 50)), "\\\\.\\com50"},
|
||||
{"/dev/ttyS50", BRACK(FHDEV(DEV_SERIAL_MAJOR, 51)), "\\\\.\\com51"},
|
||||
{"/dev/ttyS51", BRACK(FHDEV(DEV_SERIAL_MAJOR, 52)), "\\\\.\\com52"},
|
||||
{"/dev/ttyS52", BRACK(FHDEV(DEV_SERIAL_MAJOR, 53)), "\\\\.\\com53"},
|
||||
{"/dev/ttyS53", BRACK(FHDEV(DEV_SERIAL_MAJOR, 54)), "\\\\.\\com54"},
|
||||
{"/dev/ttyS54", BRACK(FHDEV(DEV_SERIAL_MAJOR, 55)), "\\\\.\\com55"},
|
||||
{"/dev/ttyS55", BRACK(FHDEV(DEV_SERIAL_MAJOR, 56)), "\\\\.\\com56"},
|
||||
{"/dev/ttyS56", BRACK(FHDEV(DEV_SERIAL_MAJOR, 57)), "\\\\.\\com57"},
|
||||
{"/dev/ttyS57", BRACK(FHDEV(DEV_SERIAL_MAJOR, 58)), "\\\\.\\com58"},
|
||||
{"/dev/ttyS58", BRACK(FHDEV(DEV_SERIAL_MAJOR, 59)), "\\\\.\\com59"},
|
||||
{"/dev/ttyS59", BRACK(FHDEV(DEV_SERIAL_MAJOR, 60)), "\\\\.\\com60"},
|
||||
{"/dev/ttyS60", BRACK(FHDEV(DEV_SERIAL_MAJOR, 61)), "\\\\.\\com61"},
|
||||
{"/dev/ttyS61", BRACK(FHDEV(DEV_SERIAL_MAJOR, 62)), "\\\\.\\com62"},
|
||||
{"/dev/ttyS62", BRACK(FHDEV(DEV_SERIAL_MAJOR, 63)), "\\\\.\\com63"},
|
||||
{"/dev/ttyS63", BRACK(FHDEV(DEV_SERIAL_MAJOR, 64)), "\\\\.\\com64"},
|
||||
{"/dev/ttyS0", BRACK(FHDEV(DEV_SERIAL_MAJOR, 0)), "\\Device\\Serial0"},
|
||||
{"/dev/ttyS1", BRACK(FHDEV(DEV_SERIAL_MAJOR, 1)), "\\Device\\Serial1"},
|
||||
{"/dev/ttyS2", BRACK(FHDEV(DEV_SERIAL_MAJOR, 2)), "\\Device\\Serial2"},
|
||||
{"/dev/ttyS3", BRACK(FHDEV(DEV_SERIAL_MAJOR, 3)), "\\Device\\Serial3"},
|
||||
{"/dev/ttyS4", BRACK(FHDEV(DEV_SERIAL_MAJOR, 4)), "\\Device\\Serial4"},
|
||||
{"/dev/ttyS5", BRACK(FHDEV(DEV_SERIAL_MAJOR, 5)), "\\Device\\Serial5"},
|
||||
{"/dev/ttyS6", BRACK(FHDEV(DEV_SERIAL_MAJOR, 6)), "\\Device\\Serial6"},
|
||||
{"/dev/ttyS7", BRACK(FHDEV(DEV_SERIAL_MAJOR, 7)), "\\Device\\Serial7"},
|
||||
{"/dev/ttyS8", BRACK(FHDEV(DEV_SERIAL_MAJOR, 8)), "\\Device\\Serial8"},
|
||||
{"/dev/ttyS9", BRACK(FHDEV(DEV_SERIAL_MAJOR, 9)), "\\Device\\Serial9"},
|
||||
{"/dev/ttyS10", BRACK(FHDEV(DEV_SERIAL_MAJOR, 10)), "\\Device\\Serial10"},
|
||||
{"/dev/ttyS11", BRACK(FHDEV(DEV_SERIAL_MAJOR, 11)), "\\Device\\Serial11"},
|
||||
{"/dev/ttyS12", BRACK(FHDEV(DEV_SERIAL_MAJOR, 12)), "\\Device\\Serial12"},
|
||||
{"/dev/ttyS13", BRACK(FHDEV(DEV_SERIAL_MAJOR, 13)), "\\Device\\Serial13"},
|
||||
{"/dev/ttyS14", BRACK(FHDEV(DEV_SERIAL_MAJOR, 14)), "\\Device\\Serial14"},
|
||||
{"/dev/ttyS15", BRACK(FHDEV(DEV_SERIAL_MAJOR, 15)), "\\Device\\Serial15"},
|
||||
{"/dev/ttyS16", BRACK(FHDEV(DEV_SERIAL_MAJOR, 16)), "\\Device\\Serial16"},
|
||||
{"/dev/ttyS17", BRACK(FHDEV(DEV_SERIAL_MAJOR, 17)), "\\Device\\Serial17"},
|
||||
{"/dev/ttyS18", BRACK(FHDEV(DEV_SERIAL_MAJOR, 18)), "\\Device\\Serial18"},
|
||||
{"/dev/ttyS19", BRACK(FHDEV(DEV_SERIAL_MAJOR, 19)), "\\Device\\Serial19"},
|
||||
{"/dev/ttyS20", BRACK(FHDEV(DEV_SERIAL_MAJOR, 20)), "\\Device\\Serial20"},
|
||||
{"/dev/ttyS21", BRACK(FHDEV(DEV_SERIAL_MAJOR, 21)), "\\Device\\Serial21"},
|
||||
{"/dev/ttyS22", BRACK(FHDEV(DEV_SERIAL_MAJOR, 22)), "\\Device\\Serial22"},
|
||||
{"/dev/ttyS23", BRACK(FHDEV(DEV_SERIAL_MAJOR, 23)), "\\Device\\Serial23"},
|
||||
{"/dev/ttyS24", BRACK(FHDEV(DEV_SERIAL_MAJOR, 24)), "\\Device\\Serial24"},
|
||||
{"/dev/ttyS25", BRACK(FHDEV(DEV_SERIAL_MAJOR, 25)), "\\Device\\Serial25"},
|
||||
{"/dev/ttyS26", BRACK(FHDEV(DEV_SERIAL_MAJOR, 26)), "\\Device\\Serial26"},
|
||||
{"/dev/ttyS27", BRACK(FHDEV(DEV_SERIAL_MAJOR, 27)), "\\Device\\Serial27"},
|
||||
{"/dev/ttyS28", BRACK(FHDEV(DEV_SERIAL_MAJOR, 28)), "\\Device\\Serial28"},
|
||||
{"/dev/ttyS29", BRACK(FHDEV(DEV_SERIAL_MAJOR, 29)), "\\Device\\Serial29"},
|
||||
{"/dev/ttyS30", BRACK(FHDEV(DEV_SERIAL_MAJOR, 30)), "\\Device\\Serial30"},
|
||||
{"/dev/ttyS31", BRACK(FHDEV(DEV_SERIAL_MAJOR, 31)), "\\Device\\Serial31"},
|
||||
{"/dev/ttyS32", BRACK(FHDEV(DEV_SERIAL_MAJOR, 32)), "\\Device\\Serial32"},
|
||||
{"/dev/ttyS33", BRACK(FHDEV(DEV_SERIAL_MAJOR, 33)), "\\Device\\Serial33"},
|
||||
{"/dev/ttyS34", BRACK(FHDEV(DEV_SERIAL_MAJOR, 34)), "\\Device\\Serial34"},
|
||||
{"/dev/ttyS35", BRACK(FHDEV(DEV_SERIAL_MAJOR, 35)), "\\Device\\Serial35"},
|
||||
{"/dev/ttyS36", BRACK(FHDEV(DEV_SERIAL_MAJOR, 36)), "\\Device\\Serial36"},
|
||||
{"/dev/ttyS37", BRACK(FHDEV(DEV_SERIAL_MAJOR, 37)), "\\Device\\Serial37"},
|
||||
{"/dev/ttyS38", BRACK(FHDEV(DEV_SERIAL_MAJOR, 38)), "\\Device\\Serial38"},
|
||||
{"/dev/ttyS39", BRACK(FHDEV(DEV_SERIAL_MAJOR, 39)), "\\Device\\Serial39"},
|
||||
{"/dev/ttyS40", BRACK(FHDEV(DEV_SERIAL_MAJOR, 40)), "\\Device\\Serial40"},
|
||||
{"/dev/ttyS41", BRACK(FHDEV(DEV_SERIAL_MAJOR, 41)), "\\Device\\Serial41"},
|
||||
{"/dev/ttyS42", BRACK(FHDEV(DEV_SERIAL_MAJOR, 42)), "\\Device\\Serial42"},
|
||||
{"/dev/ttyS43", BRACK(FHDEV(DEV_SERIAL_MAJOR, 43)), "\\Device\\Serial43"},
|
||||
{"/dev/ttyS44", BRACK(FHDEV(DEV_SERIAL_MAJOR, 44)), "\\Device\\Serial44"},
|
||||
{"/dev/ttyS45", BRACK(FHDEV(DEV_SERIAL_MAJOR, 45)), "\\Device\\Serial45"},
|
||||
{"/dev/ttyS46", BRACK(FHDEV(DEV_SERIAL_MAJOR, 46)), "\\Device\\Serial46"},
|
||||
{"/dev/ttyS47", BRACK(FHDEV(DEV_SERIAL_MAJOR, 47)), "\\Device\\Serial47"},
|
||||
{"/dev/ttyS48", BRACK(FHDEV(DEV_SERIAL_MAJOR, 48)), "\\Device\\Serial48"},
|
||||
{"/dev/ttyS49", BRACK(FHDEV(DEV_SERIAL_MAJOR, 49)), "\\Device\\Serial49"},
|
||||
{"/dev/ttyS50", BRACK(FHDEV(DEV_SERIAL_MAJOR, 50)), "\\Device\\Serial50"},
|
||||
{"/dev/ttyS51", BRACK(FHDEV(DEV_SERIAL_MAJOR, 51)), "\\Device\\Serial51"},
|
||||
{"/dev/ttyS52", BRACK(FHDEV(DEV_SERIAL_MAJOR, 52)), "\\Device\\Serial52"},
|
||||
{"/dev/ttyS53", BRACK(FHDEV(DEV_SERIAL_MAJOR, 53)), "\\Device\\Serial53"},
|
||||
{"/dev/ttyS54", BRACK(FHDEV(DEV_SERIAL_MAJOR, 54)), "\\Device\\Serial54"},
|
||||
{"/dev/ttyS55", BRACK(FHDEV(DEV_SERIAL_MAJOR, 55)), "\\Device\\Serial55"},
|
||||
{"/dev/ttyS56", BRACK(FHDEV(DEV_SERIAL_MAJOR, 56)), "\\Device\\Serial56"},
|
||||
{"/dev/ttyS57", BRACK(FHDEV(DEV_SERIAL_MAJOR, 57)), "\\Device\\Serial57"},
|
||||
{"/dev/ttyS58", BRACK(FHDEV(DEV_SERIAL_MAJOR, 58)), "\\Device\\Serial58"},
|
||||
{"/dev/ttyS59", BRACK(FHDEV(DEV_SERIAL_MAJOR, 59)), "\\Device\\Serial59"},
|
||||
{"/dev/ttyS60", BRACK(FHDEV(DEV_SERIAL_MAJOR, 60)), "\\Device\\Serial60"},
|
||||
{"/dev/ttyS61", BRACK(FHDEV(DEV_SERIAL_MAJOR, 61)), "\\Device\\Serial61"},
|
||||
{"/dev/ttyS62", BRACK(FHDEV(DEV_SERIAL_MAJOR, 62)), "\\Device\\Serial62"},
|
||||
{"/dev/ttyS63", BRACK(FHDEV(DEV_SERIAL_MAJOR, 63)), "\\Device\\Serial63"},
|
||||
{"/dev/ttym", BRACK(FH_TTYM), "\\dev\\ttym"},
|
||||
{"/dev/urandom", BRACK(FH_URANDOM), "\\dev\\urandom"},
|
||||
{"/dev/windows", BRACK(FH_WINDOWS), "\\dev\\windows"},
|
||||
|
|
|
@ -69,7 +69,7 @@ const device dev_bad_storage =
|
|||
"/dev/dsp", BRACK(FH_OSS_DSP), "\\dev\\dsp"
|
||||
"/dev/conin", BRACK(FH_CONIN), "conin"
|
||||
"/dev/conout", BRACK(FH_CONOUT), "conout"
|
||||
"/dev/null", BRACK(FH_NULL), "nul"
|
||||
"/dev/null", BRACK(FH_NULL), "\\Device\\Null"
|
||||
"/dev/zero", BRACK(FH_ZERO), "\\dev\\zero"
|
||||
"/dev/full", BRACK(FH_FULL), "\\dev\\full"
|
||||
"/dev/random", BRACK(FH_RANDOM), "\\dev\\random"
|
||||
|
@ -78,8 +78,8 @@ const device dev_bad_storage =
|
|||
"/dev/kmem", BRACK(FH_KMEM), "\\dev\\mem"
|
||||
"/dev/clipboard", BRACK(FH_CLIPBOARD), "\\dev\\clipboard"
|
||||
"/dev/port", BRACK(FH_PORT), "\\dev\\port"
|
||||
"/dev/com%(1-16)d", BRACK(FHDEV(DEV_SERIAL_MAJOR, {$1})), "\\\\.\\com{$1}"
|
||||
"/dev/ttyS%(0-63)d", BRACK(FHDEV(DEV_SERIAL_MAJOR, {$1 + 1})), "\\\\.\\com{$1 + 1}"
|
||||
"/dev/com%(1-16)d", BRACK(FHDEV(DEV_SERIAL_MAJOR, {$1 - 1})), "\\Device\\Serial{$1 - 1}"
|
||||
"/dev/ttyS%(0-63)d", BRACK(FHDEV(DEV_SERIAL_MAJOR, {$1})), "\\Device\\Serial{$1}"
|
||||
"/dev/pipe", BRACK(FH_PIPE), "\\dev\\pipe"
|
||||
"/dev/fifo", BRACK(FH_FIFO), "\\dev\\fifo"
|
||||
"/dev/st%(0-127)d", BRACK(FHDEV(DEV_TAPE_MAJOR, {$1})), "\\Device\\Tape{$1}"
|
||||
|
|
|
@ -458,119 +458,6 @@ done:
|
|||
return res;
|
||||
}
|
||||
|
||||
/* Open system call handler function. */
|
||||
int
|
||||
fhandler_base::open_9x (int flags, mode_t mode)
|
||||
{
|
||||
int res = 0;
|
||||
HANDLE x;
|
||||
int file_attributes;
|
||||
int creation_distribution;
|
||||
SECURITY_ATTRIBUTES sa = sec_none;
|
||||
|
||||
syscall_printf ("(%s, %p)", get_win32_name (), flags);
|
||||
|
||||
switch (query_open ())
|
||||
{
|
||||
case query_read_control:
|
||||
case query_stat_control:
|
||||
access = GENERIC_READ;
|
||||
break;
|
||||
case query_write_control:
|
||||
case query_write_attributes:
|
||||
access = GENERIC_READ | FILE_WRITE_ATTRIBUTES;
|
||||
break;
|
||||
default:
|
||||
if ((flags & O_ACCMODE) == O_RDONLY)
|
||||
access = GENERIC_READ;
|
||||
else if ((flags & O_ACCMODE) == O_WRONLY)
|
||||
access = GENERIC_WRITE;
|
||||
else
|
||||
access = GENERIC_READ | GENERIC_WRITE;
|
||||
break;
|
||||
}
|
||||
|
||||
if ((flags & O_TRUNC) && ((flags & O_ACCMODE) != O_RDONLY))
|
||||
{
|
||||
if (flags & O_CREAT)
|
||||
creation_distribution = CREATE_ALWAYS;
|
||||
else
|
||||
creation_distribution = TRUNCATE_EXISTING;
|
||||
}
|
||||
else if (flags & O_CREAT)
|
||||
creation_distribution = OPEN_ALWAYS;
|
||||
else
|
||||
creation_distribution = OPEN_EXISTING;
|
||||
|
||||
if ((flags & O_EXCL) && (flags & O_CREAT))
|
||||
creation_distribution = CREATE_NEW;
|
||||
|
||||
if (flags & O_APPEND)
|
||||
append_mode (true);
|
||||
|
||||
file_attributes = FILE_ATTRIBUTE_NORMAL;
|
||||
if (flags & O_DIROPEN)
|
||||
file_attributes |= FILE_FLAG_BACKUP_SEMANTICS;
|
||||
if (flags & O_SYNC)
|
||||
file_attributes |= FILE_FLAG_WRITE_THROUGH;
|
||||
if (flags & O_DIRECT)
|
||||
file_attributes |= FILE_FLAG_NO_BUFFERING;
|
||||
if (get_major () == DEV_SERIAL_MAJOR)
|
||||
file_attributes |= FILE_FLAG_OVERLAPPED;
|
||||
|
||||
#ifdef HIDDEN_DOT_FILES
|
||||
if (flags & O_CREAT && get_device () == FH_FS)
|
||||
{
|
||||
char *c = strrchr (get_win32_name (), '\\');
|
||||
if ((c && c[1] == '.') || *get_win32_name () == '.')
|
||||
file_attributes |= FILE_ATTRIBUTE_HIDDEN;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (flags & O_CREAT && get_device () == FH_FS)
|
||||
{
|
||||
/* If mode has no write bits set, we set the R/O attribute. */
|
||||
if (!(mode & (S_IWUSR | S_IWGRP | S_IWOTH)))
|
||||
file_attributes |= FILE_ATTRIBUTE_READONLY;
|
||||
/* The file attributes are needed for later use in, e.g. fchmod. */
|
||||
pc.file_attributes (file_attributes & FILE_ATTRIBUTE_VALID_SET_FLAGS);
|
||||
}
|
||||
|
||||
x = CreateFile (get_win32_name (), access, FILE_SHARE_VALID_FLAGS, &sa, creation_distribution,
|
||||
file_attributes, 0);
|
||||
|
||||
if (x == INVALID_HANDLE_VALUE)
|
||||
{
|
||||
if (pc.isdir ())
|
||||
{
|
||||
if ((flags & O_ACCMODE) != O_RDONLY)
|
||||
set_errno (EISDIR);
|
||||
else
|
||||
nohandle (true);
|
||||
}
|
||||
else if (GetLastError () == ERROR_INVALID_HANDLE)
|
||||
set_errno (ENOENT);
|
||||
else
|
||||
__seterrno ();
|
||||
if (!nohandle ())
|
||||
goto done;
|
||||
}
|
||||
|
||||
set_io_handle (x);
|
||||
set_flags (flags, pc.binmode ());
|
||||
|
||||
res = 1;
|
||||
set_open_status ();
|
||||
done:
|
||||
debug_printf ("%p = CreateFile (%s, %p, %p, %p, %p, %p, 0)",
|
||||
x, get_win32_name (), access, FILE_SHARE_VALID_FLAGS, &sa,
|
||||
creation_distribution, file_attributes);
|
||||
|
||||
syscall_printf ("%d = fhandler_base::open (%s, %p)", res, get_win32_name (),
|
||||
flags);
|
||||
return res;
|
||||
}
|
||||
|
||||
/* Open system call handler function. */
|
||||
int
|
||||
fhandler_base::open (int flags, mode_t mode)
|
||||
|
@ -579,9 +466,6 @@ fhandler_base::open (int flags, mode_t mode)
|
|||
UNICODE_STRING upath = {0, sizeof (wpath), wpath};
|
||||
pc.get_nt_native_path (upath);
|
||||
|
||||
if (RtlIsDosDeviceName_U (upath.Buffer))
|
||||
return fhandler_base::open_9x (flags, mode);
|
||||
|
||||
int res = 0;
|
||||
HANDLE x;
|
||||
ULONG file_attributes = 0;
|
||||
|
@ -1449,15 +1333,6 @@ fhandler_dev_null::fhandler_dev_null () :
|
|||
{
|
||||
}
|
||||
|
||||
int
|
||||
fhandler_dev_null::open (int flags, mode_t mode)
|
||||
{
|
||||
char posix[strlen (get_name ()) + 1];
|
||||
strcpy (posix, get_name ());
|
||||
pc.set_name ("NUL", posix);
|
||||
return fhandler_base::open_9x (flags, mode);
|
||||
}
|
||||
|
||||
void
|
||||
fhandler_base::set_no_inheritance (HANDLE &h, bool not_inheriting)
|
||||
{
|
||||
|
|
|
@ -257,7 +257,6 @@ class fhandler_base
|
|||
bool fork_fixup (HANDLE, HANDLE &, const char *);
|
||||
virtual bool need_fixup_before () const {return false;}
|
||||
|
||||
int open_9x (int, mode_t = 0);
|
||||
virtual int open (int, mode_t = 0);
|
||||
int open_fs (int, mode_t = 0);
|
||||
virtual int close ();
|
||||
|
@ -1066,7 +1065,6 @@ class fhandler_dev_null: public fhandler_base
|
|||
{
|
||||
public:
|
||||
fhandler_dev_null ();
|
||||
int open (int, mode_t);
|
||||
|
||||
select_record *select_read (select_record *s);
|
||||
select_record *select_write (select_record *s);
|
||||
|
|
Loading…
Reference in New Issue