delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/04/29/13:02:57

Message-Id: <m0yUaE7-000S3YC@inti.gov.ar>
Comments: Authenticated sender is <salvador AT natacha DOT inti DOT gov DOT ar>
From: "Salvador Eduardo Tropea (SET)" <salvador AT inti DOT gov DOT ar>
Organization: INTI
To: djgpp AT delorie DOT com
Date: Wed, 29 Apr 1998 14:08:09 +0000
MIME-Version: 1.0
Subject: fstat and stat in a Novell disk (fstat have a flaw)

Hi All!

 I have some questions about fstat/stat. I found they work VERY different. My 
problem is that I'm getting different responses from stat and fstat for the 
same file. The configuration is a little complex: MSDOS 6.2x + Novell 3.12. 
 The difference is in the WRITE access flag. When using stat it gives the write 
access based on the DOS file attributes, Read-Only, Hidden and System files 
are reported as NO write access for the user. That's ok. But when using fstat 
it uses some SFT(?) table, I don't know what's that, anyways, Novell doesn't 
support it and hence libc just gives a general description, that means: the 
file have read access because DOS ever have it, but no write access just in 
case. 
 That's bad for my editor because it detects the files as read-only. I'm using 
stat because I want to get the program working on UNIX. Now the question is: 
why fstat can't use the file attributes to solve it? Is there any limitation to 
this methode because the file is opened? Is because we don't know the name of 
the file?
  I tried under DOS 7.10 and DOS 6.22 accessing to a file in the Novell 
disk and I can get the file attributes OK even when the file is in use. That 
means: a file with DOS' attribute read-only in the Novell disk reports 
read-only perfectly  

SET
------------------------------------ 0 --------------------------------
Visit my home page: http://set-soft.home.ml.org/
or
http://www.geocities.com/SiliconValley/Vista/6552/
Salvador Eduardo Tropea (SET). (Electronics Engineer)
Alternative e-mail: set-soft AT usa DOT net set AT computer DOT org
ICQ: 2951574
Address: Curapaligue 2124, Caseros, 3 de Febrero
Buenos Aires, (1678), ARGENTINA
TE: +(541) 759 0013

- Raw text -


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