Date: Sun, 23 Nov 1997 15:01:31 +0200 (IST) From: Eli Zaretskii To: Oberhumer Markus cc: djgpp-workers AT delorie DOT com, dj AT delorie DOT com Subject: Re: 971114: misc notes In-Reply-To: <199711201756.TAA13406@is.elta.co.il> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk On Thu, 20 Nov 1997, Oberhumer Markus wrote: > else if (strncmp(p, "/dev/", 5) == 0) > { > /* new code: map /dev/a/ to a:/ (lowercase directories only) */ > if (p[5] >= 'a' && p[5] <= 'z' && p[6] == '/') > { > _farnspokeb(o++, p[5]); > _farnspokeb(o++, ':'); > path = p + 6; > space -= 2; > } Why only lowercase [a-z]? MS platforms are case-insensitive; I think it will be confusing to introduce case-sensitivity in such subtle cases. Somebody somewhere might convert file names to upper case knowing that it doesn't matter, and will be badly burnt. > #if 0 > /* disabled code from 971114 which just removes '/dev/' */ > else if (p[5] != 0) > path = p + 5; > #endif Disabling this will break many things. For example, "ls /dev/tty" will NOT know that /dev/tty is a device. More significantly, "/dev/clock$" and any other DOS device won't return the S_IFCHR bit set. This is BAD, IMHO. For example, opening a file whose name is taken by a device driver will almost always get you into trouble, and `stat' is the only way to know about the trouble beforehand. The DJGPP port of `tar' uses this trick to avoid problems when the archive includes files like `prn.txt' or `/dev/aux.c'.