diff options
author | Ian Moffett <ian@osmora.org> | 2024-03-07 17:28:00 -0500 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2024-03-07 17:28:32 -0500 |
commit | bd5969fc876a10b18613302db7087ef3c40f18e1 (patch) | |
tree | 7c2b8619afe902abf99570df2873fbdf40a4d1a1 /lib/mlibc/options/linux/include/mntent.h | |
parent | a95b38b1b92b172e6cc4e8e56a88a30cc65907b0 (diff) |
lib: Add mlibc
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'lib/mlibc/options/linux/include/mntent.h')
-rw-r--r-- | lib/mlibc/options/linux/include/mntent.h | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/lib/mlibc/options/linux/include/mntent.h b/lib/mlibc/options/linux/include/mntent.h new file mode 100644 index 0000000..bafd289 --- /dev/null +++ b/lib/mlibc/options/linux/include/mntent.h @@ -0,0 +1,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 |