delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1997/12/23/09:38:57

Date: Tue, 23 Dec 1997 16:37:10 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Randy Maas <randym AT acm DOT org>
cc: djgpp-workers AT delorie DOT com
Subject: Re: mntent patch - c file
In-Reply-To: <3.0.1.32.19971223070241.007f59e0@yacker.xiotech.com>
Message-ID: <Pine.SUN.3.91.971223162821.14788A-100000@is>
MIME-Version: 1.0

On Tue, 23 Dec 1997, Randy Maas wrote:

> >MNT_MNTTAB was lifted from Unix header files.  Some Unix-born
> >program could expect that to be a compile-time string.
> 
> Rats.  I'd still like to have it tho' -- how many of the unix-born programs
> are being ported to djgpp?  How hard is it to fix them?

The entire v2gnu directory is Unix programs, for starters.  I don't know 
how of them use MNT_MNTTAB (I'd guess at most one), but that's beyond the 
point.  I think we should not introduce incompatibilities without a very 
good reason.  There is no need to make MNT_MNTTAB call a function, since 
DJGPP ports don't need to know the actual name of the mount tab file.  
You could leave MNT_MNTTAB alone and just provide a DJGPP-specific 
function which will return the true file name.

> My short version: Yes, It has to be shared, yes.  
> Long version: Basically what I'm experimenting with is a .dxe file that is
> only loaded if the application tries to open it's mount point.  For these
> applications, the mnttab holds valuable information -- the module to load,
> the mount point, and some configuration information.

I still don't understand why this design cannot hold the info in memory.  
Is some limitation of DXE preventing it?  If so, it might be possible to 
work around that limitation instead of writing a file.

> >                            It surely will have one effect that could
> >surprise people: programs run after the file was created will see
> >those fake filesystems which they probably cannot access.
> 
> Only programs that use mntent and not loadable fsexts.  These will see
> filesystems with bizarre fstypes that don't correspond to dos or unixish
> things (ie, "PLUGIN", "FIFO" and whatever others add) --- but only if they
> scan with getmntent.

You seem to think that `getmntent' is largely unused.  This is false: it 
is used by programs which want to know what file systems are available 
and what are their types.  Just yesterday there was a thread on c.o.m.d 
where somebody asked how could he know which drives could be accesses; 
and the answer is `getmntent'.  Having it return strange drives which the 
program cannot access (since it didn't link in the necessary FSEXT 
handlers) will break it.

- Raw text -


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