# mountlist.c File Reference

`#include "mountlist.h"`
`#include <limits.h>`
`#include <stdio.h>`
`#include <stdlib.h>`
`#include <string.h>`
`#include <errno.h>`
`#include <fcntl.h>`
`#include <unistd.h>`
`#include <mntent.h>`

## Defines
#define | MOUNTED_GETMNTENT1
#define | MNT_IGNORE(M) 0
#define | SIZE_MAX ((size_t) -1)
#define | ME_DUMMY(Fs_name, Fs_type)
#define | ME_REMOTE(Fs_name, Fs_type)
## Functions
static dev_t | dev_from_mount_options (char const *mount_options)
struct mount_entry * | read_file_system_list (bool need_fs_type)

## Define Documentation

#define MOUNTED_GETMNTENT1

#define MNT_IGNORE | ( | M |  | ) | 0

Referenced by read_file_system_list().

#define SIZE_MAX ((size_t) -1)

Referenced by read_file_system_list().

#define ME_DUMMY | ( | Fs_name,
|  | Fs_type |  | ) |

Value:

    (strcmp (Fs_type, "autofs") == 0            \
         || strcmp (Fs_type, "none") == 0           \
         || strcmp (Fs_type, "proc") == 0           \
         || strcmp (Fs_type, "subfs") == 0          \
         || strcmp (Fs_type, "sysfs") == 0          \
         || strcmp (Fs_type, "usbfs") == 0          \
         || strcmp (Fs_type, "devpts") == 0         \
         || strcmp (Fs_type, "tmpfs") == 0          \
         /* for NetBSD 3.0 */                       \
         || strcmp (Fs_type, "kernfs") == 0         \
         /* for Irix 6.5 */                         \
         || strcmp (Fs_type, "ignore") == 0)

Referenced by read_file_system_list().

#define ME_REMOTE | ( | Fs_name,
|  | Fs_type |  | ) |

Value:

    (strchr (Fs_name, ':') != NULL              \
         || ((Fs_name)[0] == '/'                    \
             && (Fs_name)[1] == '/'                 \
             && (strcmp (Fs_type, "smbfs") == 0     \
                 || strcmp (Fs_type, "cifs") == 0)))

Referenced by read_file_system_list().

## Function Documentation

static dev_t dev_from_mount_options | ( | char const * | mount_options | ) | `[static]`

Referenced by read_file_system_list().

struct mount_entry* read_file_system_list | ( | bool | need_fs_type | ) | `[read]`

References dev_from_mount_options(), mount_entry::me_dev, mount_entry::me_devname, ME_DUMMY, mount_entry::me_dummy, mount_entry::me_mountdir, mount_entry::me_next, ME_REMOTE, mount_entry::me_remote, mount_entry::me_type, mount_entry::me_type_malloced, MNT_IGNORE, and SIZE_MAX.

Referenced by Lire_liste_des_lecteurs().