httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gregory A Lundberg <lundb...@vr.net>
Subject Re: MSDOS File System Curiosities
Date Wed, 06 May 1998 16:22:06 GMT

What you're looking at, in DOS memory, is the device header chain.  The
problem you're working on isn't solvable by statically-coded names, since
the names can be determined by the programmer of whatever sofrware appears
on the DEVICE= line in CONFIG.SYS for DOS (and W95, dunno about NT except
that it's different) 

ISTR there's a little-know system call which will return information about
the devices.  It's in my MS Press DOS book (70 miles away), so it's
documented .. just not often used.  I don't think you'll find a C function
for it, so you'll have to go to assembly-code (inline?) to test for these.

On Wed, 6 May 1998, Ben Hyde wrote:

> Date: Wed, 6 May 1998 12:04:15 -0400
> From: Ben Hyde <bhyde@gensym.com>
> Reply-To: new-httpd@apache.org
> To: "'new-httpd@apache.org'" <new-httpd@apache.org>
> Subject: MSDOS File System Curiosities
> 
> There is a great many pages in the "developer's network" CD about these
> filenames.
> 
> Approximately one for every application MS has ever made that attempts
> to explain
> why something seems broken as a result of this.  The following is
> typical:
> ---
> If you search for a file in the Microsoft Windows File Manager program,
> using some MS-DOS reserved words with the File Search command, File
> Manager finds those reserved word in all directories because MS-DOS
> character devices are defined as files in all directories. This is
> standard MS-DOS behavior. 
> 
> Examples of MS-DOS reserved words are: 
>    CON   COM1 - COM4
>    PRN   AUX    LPT1
> ---
> It's particularly obnoxious that they say "examples"   I believe this is
> the complete
> list, but I'm not sure.  The note this a longer list.
>    CON     Keyboard and display
>    PRN     System list device, usually a parallel port
>    AUX     Auxiliary device, usually a serial port
>    CLOCK$  System real-time clock
>    NUL     Bit-bucket device
>    A:-Z:   Drive letters
>    COM1    First serial communications port
>    LPT1    First parallel printer port
>    LPT2    Second parallel printer port
>    LPT3    Third parallel printer port
>    COM2    Second serial communications port
>    COM3    Third serial communications port
>    COM4    Fourth serial communications port
> 
> It maybe this is the whole list, or that it is in fact all devices that
> are character based, or WHO KNOWS!
> 
> One note suggests looking at memory around 0070 to find this list.
>   > debug
>   -  d 0070:0000
>   0070:0000  E9 6D 03 A7 00 EA FD 02-70 00 00 00 00 FF AF 00
> .m......p.......
>   0070:0010  DC 02 87 DB 00 32 20 00-94 03 A7 00 00 00 00 00   .....2
> .........
>   0070:0020  00 00 E8 00 36 00 70 00-13 80 EC 01 F7 01 43 4F
> ....6.p.......CO
>   0070:0030  4E 20 20 20 20 20 48 00-70 00 00 80 EC 01 18 02   N
> H.p.......
>   0070:0040  41 55 58 20 20 20 20 20-5A 00 70 00 C0 A8 EC 01   AUX
> Z.p.....
>   0070:0050  FC 01 50 52 4E 20 20 20-20 20 6C 00 70 00 08 80   ..PRN
> l.p...
> 
> To add to my confusion there is a note about how to delete such files
> under NT,
> so it must be possible for them to exist.  It recomends (I love this) rm
> from the
> posix tools.  Which opens the possiblity that this is all a mute point
> within the
> "posix" subsystem.
> 
> In summary I suspect that taking the list above and declining to handle
> any
> of those, i.e. not LPT3 or LPT3.* we are pretty safe.   I'm not
> preparing a 
> patch, I'm just reading the "doc."
> 
>   - ben
> 
> 
> 
> 
> 


----

Gregory A Lundberg		Senior Partner, VRnet Company
1441 Elmdale Drive              lundberg@vr.net
Kettering, OH 45409-1615 USA    1-800-809-2195


Mime
View raw message