delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2001/08/05/18:10:36

From: sandmann AT clio DOT rice DOT edu (Charles Sandmann)
Message-Id: <10108052205.AA12321@clio.rice.edu>
Subject: Re: Windows 2000 /dev/null permission query
To: eliz AT is DOT elta DOT co DOT il
Date: Sun, 5 Aug 2001 17:05:22 -0500 (CDT)
Cc: acottrel AT ihug DOT com DOT au, djgpp-workers AT delorie DOT com
In-Reply-To: <8011-Sun05Aug2001214350+0300-eliz@is.elta.co.il> from "Eli Zaretskii" at Aug 05, 2001 09:43:50 PM
X-Mailer: ELM [version 2.5 PL2]
Mime-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> I'd say, let's test for a character device (it's a single Int 21h
> call), and then ignore the error.  FWIW, I know that some (but not
> all) versions of Windows 9X also don't like "foo > prn", but allow
> "foo >>prn".  Truncating a device doesn't make sense anyway, so we
> probably should avoid the _write call for devices altogether.

OK.  More info here, and you are not going to like it :-P

I added a call to _get_dev_info for NUL - and it returns 0, it's not
a character device ... (don't you love Win 2k?)

Now, thinking about the other problems we had noticed, I then did a
set lfn=n ... 

Now, the write of zero bytes to NUL works fine.  And _get_dev_info
returns lots of bits (but I don't need them now...)

Touch a.a works with lfn=n but fails with lfn not set.

Conclusion - LFN support in W2K is breaking things (like truncate,
utime, get_dev_info).  Handles opened with the LFN calls are not being
treated the same as those opened with the old DOS APIs.

I'll have to think about this...

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019