Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- libc - <b>setmntent</b> http://www.ousob.com [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
setmntent
=========

Syntax
------

     #include <mntent.h>
     
     FILE *setmntent(char *filename, const char *mode);

Description
-----------

This function returns an open FILE* pointer which can be used by
getmntent (getmntent:.).  The arguments FILENAME and MODE are   
always ignored under MS-DOS, but for portability should be set,
accordingly, to the name of the file which describes the mounted
filesystems and the open mode of that file (like the MODE argument to
`fopen', fopen:).  (There is no single standard for the name of   
the file that keeps the mounted filesystems, but it is usually,
although not always, listed in the header `<mntent.h>'.)

Return Value
------------

The FILE* pointer is returned.  For MS-DOS, this FILE* is not a real
pointer and may only be used by `getmntent'.

Example
-------

     #include <mntent.h>
     #if defined(MNT_MNTTAB)
     #define MNTTAB_FILE MNT_MNTTAB
     #elif defined(MNTTABNAME)
     #define MNTTAB_FILE MNTTABNAME
     #else
     #define MNTTAB_FILE "/etc/mnttab"
     #endif
     
       FILE *mnt_fp = setmntent (MNTTAB_FILE, "r");


See Also: getmntent fopen

Online resources provided by: http://www.ousob.com --- NG 2 HTML conversion by Dave Pearson