delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2003/02/26/09:27:52

Sender: rich AT phekda DOT freeserve DOT co DOT uk
Message-ID: <3E5CD60E.63351BC4@phekda.freeserve.co.uk>
Date: Wed, 26 Feb 2003 14:58:22 +0000
From: Richard Dawe <rich AT phekda DOT freeserve DOT co DOT uk>
X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.2.23 i586)
X-Accept-Language: de,fr
MIME-Version: 1.0
To: djgpp-workers AT delorie DOT com
CC: Richard Dawe <rich AT phekda DOT freeserve DOT co DOT uk>
Subject: Re: fchmod, revision 3 [PATCH]
References: <E18o0Zp-0000Vg-00 AT phekda DOT freeserve DOT co DOT uk>
Reply-To: djgpp-workers AT delorie DOT com

Hello.

Richard Dawe wrote:
> 
> Hello.
> 
> Here's revision 3 of the fchmod patch. The only change is that
> it now returns ENOSYS, if the file name cannot be obtained
> from fd_props, as suggested by Eli.
> 
> This needs testing on DOS and Windows 2000/XP.
[snip]

Here are some results for DOS 7.1 (or whatever the DOS that comes with Windows
'98 SE is called):

Using fchmod to change a file from read-write to read-only seems to work, as
long as you don't write to the file after the fchmod call. If you write after
fchmod(..., S_IRUSR), then the file reverts to read-write. I will add a note
to the fchmod info page.

It seems that DOS does not have the same separation between open attributes
and file attributes that Windows '98 SE (and '95 & ME?) does. I'm guessing
that this is a consequence of the magical LFN API.

Bye, Rich =]

-- 
Richard Dawe [ http://www.phekda.freeserve.co.uk/richdawe/ ]

- Raw text -


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