summaryrefslogtreecommitdiff
path: root/lib/mlibc/options/linux/include/mntent.h
blob: bafd289ed7a71fddd464e61c7dadbc87597830a8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#ifndef _MNTENT_H
#define _MNTENT_H

#include <stdio.h>

// TODO: Refer to _PATH_MOUNTED
#define MOUNTED "/etc/mtab"

/* Generic mount options */
#define MNTOPT_DEFAULTS "defaults"		/* Use all default options. */
#define MNTOPT_RO       "ro"			/* Read only. */
#define MNTOPT_RW       "rw"			/* Read/write. */
#define MNTOPT_SUID     "suid"			/* Set uid allowed. */
#define MNTOPT_NOSUID   "nosuid"		/* No set uid allowed. */
#define MNTOPT_NOAUTO   "noauto"		/* Do not auto mount. */

#ifdef __cplusplus
extern "C" {
#endif

struct mntent {
	char *mnt_fsname;
	char *mnt_dir;
	char *mnt_type;
	char *mnt_opts;
	int mnt_freq;
	int mnt_passno;
};

#ifndef __MLIBC_ABI_ONLY

FILE *setmntent(const char *, const char *);

struct mntent *getmntent(FILE *);

int addmntent(FILE *, const struct mntent *);

int endmntent(FILE *);

char *hasmntopt(const struct mntent *, const char *);

struct mntent *getmntent_r(FILE *, struct mntent *,  char *, int);

#endif /* !__MLIBC_ABI_ONLY */

#ifdef __cplusplus
}
#endif

#endif // _MNTENT_H