delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1994/05/26/13:24:16

From: Eric Backus <ericb AT lsid DOT hp DOT com>
Subject: Re: Library problems
To: eliz AT is DOT elta DOT co DOT il
Date: Thu, 26 May 94 9:30:47 PDT
Cc: djgpp AT sun DOT soe DOT clarkson DOT edu (djgpp)
Mailer: Elm [revision: 70.85]

Eli Zaretskii wrote:
> The st_ino value does require the pathname of the file, though,
> because it returns its hash value in the st_ino field, but that is a
> design decision.  You could return e.g. the number of the file's
> first cluster instead.

When I wrote the pathname hashing inode code, it was because I didn't
know how to get the disk block number of the first block of the file.
If there is a good way to do this, it would be MUCH better than the
existing way.  A major drawback of the existing method is the inode
numbers can change each time you start a program.

> > There must be some way to ask DOS for the pathname
> > associated with the file pointer that fstat() gets, but I'm not a DOS
> > expert so I don't know how to do that.
> 
> There is no *documented* way to do this, as far as I know.
> ``Undocumented DOS'' book describes at least one *undocumented* way,
> using the file table in the PSP (program segment prefix) of the
> program.

Ugh.  Can we get the disk block number in a documented way?
--
				Eric Backus
				ericb AT lsid DOT hp DOT com
				(206) 335-2495

- Raw text -


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