[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

getmntent emulation?



Hello all,

I have been looking at updating my GNU fileutils by re-compiling
them on my system.  This brought to my attention the fact that
we are missing a function, in the MiNTlibs, that would provide
information about mounted file systems.  (We would need it for
df; what other programs need this kind of information?) 

I know that MiNT file systems are not "mounted" in the Unix
sense, but since we are aiming at Unix portability, perhaps we
ought to have such a function.  Various flavours of Unix have
different APIs for reading mounted file-system info.  My
proposal, such as it is, would be to emulate the GNU C library's
getmntent function.

Hoping that I might be able to do this myself, I started on
some research.  Here is what I found: 

There is an existing port of GNU df for MiNT.  The patch was
done in 1991 by Eric Smith.  Eric just wrote directly into the
df source code, the instructions it needed to work on the Atari. 
I was thinking of perhaps following his code as an example to
build a getmntent emulation for the MiNT lib, but 1991 was a
long time ago; MiNT and the file systems have evolved quite a
bit since then.  Even to my not-so-expert eye, that code looked
in need of an update.  So this is turning out to be a bit more
than just an exercise in code-transposing.  This would better be
done "dans les regles de l'art", by someone who groks Atari and
Unix system programming.  There are some people on this list who
could do this before breakfast.  Pretty please? :-)  I can make
available, in short order, Eric's code, as well as the mntent
code from the GNU C library. 

Cheers

Yves