1
0

mntent.h 837 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #ifndef _MNTENT_H
  2. #define _MNTENT_H
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6. #define __NEED_FILE
  7. #include <bits/alltypes.h>
  8. #define MOUNTED "/etc/mtab"
  9. #define MNTTYPE_IGNORE "ignore"
  10. #define MNTTYPE_NFS "nfs"
  11. #define MNTTYPE_SWAP "swap"
  12. #define MNTOPT_DEFAULTS "defaults"
  13. #define MNTOPT_RO "ro"
  14. #define MNTOPT_RW "rw"
  15. #define MNTOPT_SUID "suid"
  16. #define MNTOPT_NOSUID "nosuid"
  17. #define MNTOPT_NOAUTO "noauto"
  18. struct mntent {
  19. char *mnt_fsname;
  20. char *mnt_dir;
  21. char *mnt_type;
  22. char *mnt_opts;
  23. int mnt_freq;
  24. int mnt_passno;
  25. };
  26. FILE *setmntent(const char *, const char *);
  27. int endmntent(FILE *);
  28. struct mntent *getmntent(FILE *);
  29. struct mntent *getmntent_r(FILE *, struct mntent *, char *, int);
  30. int addmntent(FILE *, const struct mntent *);
  31. char *hasmntopt(const struct mntent *, const char *);
  32. #ifdef __cplusplus
  33. }
  34. #endif
  35. #endif