mntent.h 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. #ifndef _MNTENT_H
  2. #define _MNTENT_H
  3. #include <features.h>
  4. #define MNTTAB "/etc/fstab"
  5. #define MOUNTED "/etc/mtab"
  6. #define MNTMAXSTR 512
  7. #define MNTTYPE_COHERENT "coherent" /* Coherent file system */
  8. #define MNTTYPE_EXT "ext" /* Extended file system */
  9. #define MNTTYPE_EXT2 "ext2" /* Second Extended file system */
  10. #define MNTTYPE_HPFS "hpfs" /* OS/2's high performance file system */
  11. #define MNTTYPE_ISO9660 "iso9660" /* ISO CDROM file system */
  12. #define MNTTYPE_MINIX "minix" /* MINIX file system */
  13. #define MNTTYPE_MSDOS "msdos" /* MS-DOS file system */
  14. #define MNTTYPE_VFAT "vfat" /* VFAT (Win95) file system */
  15. #define MNTTYPE_SYSV "sysv" /* System V file system */
  16. #define MNTTYPE_UMSDOS "umsdos" /* U MS-DOS file system */
  17. #define MNTTYPE_XENIX "xenix" /* Xenix file system */
  18. #define MNTTYPE_XIAFS "xiafs" /* Frank Xia's file system */
  19. #define MNTTYPE_NFS "nfs" /* Network file system */
  20. #define MNTTYPE_PROC "proc" /* Linux process file system */
  21. #define MNTTYPE_IGNORE "ignore" /* Ignore this entry */
  22. #define MNTTYPE_SWAP "swap" /* Swap device */
  23. /* generic mount options */
  24. #define MNTOPT_DEFAULTS "defaults" /* use all default opts */
  25. #define MNTOPT_RO "ro" /* read only */
  26. #define MNTOPT_RW "rw" /* read/write */
  27. #define MNTOPT_SUID "suid" /* set uid allowed */
  28. #define MNTOPT_NOSUID "nosuid" /* no set uid allowed */
  29. #define MNTOPT_NOAUTO "noauto" /* don't auto mount */
  30. /* ext2 and msdos options */
  31. #define MNTOPT_CHECK "check" /* filesystem check level */
  32. /* ext2 specific options */
  33. #define MNTOPT_BSDDF "bsddf" /* disable MINIX compatibility disk free counting */
  34. #define MNTOPT_BSDGROUPS "bsdgroups" /* set BSD group usage */
  35. #define MNTOPT_ERRORS "errors" /* set behaviour on error */
  36. #define MNTOPT_GRPID "grpid" /* set BSD group usage */
  37. #define MNTOPT_MINIXDF "minixdf" /* enable MINIX compatibility disk free counting */
  38. #define MNTOPT_NOCHECK "nocheck" /* reset filesystem checks */
  39. #define MNTOPT_NOGRPID "nogrpid" /* set SYSV group usage */
  40. #define MNTOPT_RESGID "resgid" /* group to consider like root for reserved blocks */
  41. #define MNTOPT_RESUID "resuid" /* user to consider like root for reserved blocks */
  42. #define MNTOPT_SB "sb" /* set used super block */
  43. #define MNTOPT_SYSVGROUPS "sysvgroups" /* set SYSV group usage */
  44. /* options common to hpfs, isofs, and msdos */
  45. #define MNTOPT_CONV "conv" /* convert specified types of data */
  46. #define MNTOPT_GID "gid" /* use given gid */
  47. #define MNTOPT_UID "uid" /* use given uid */
  48. #define MNTOPT_UMASK "umask" /* use given umask, not isofs */
  49. /* hpfs specific options */
  50. #define MNTOPT_CASE "case" /* case conversation */
  51. /* isofs specific options */
  52. #define MNTOPT_BLOCK "block" /* use given block size */
  53. #define MNTOPT_CRUFT "cruft" /* ??? */
  54. #define MNTOPT_MAP "map" /* ??? */
  55. #define MNTOPT_NOROCK "norock" /* not rockwell format ??? */
  56. /* msdos specific options */
  57. #define MNTOPT_FAT "fat" /* set FAT size */
  58. #define MNTOPT_QUIET "quiet" /* ??? */
  59. /* swap specific options */
  60. /* options common to ext, ext2, minix, xiafs, sysv, xenix, coherent */
  61. #define MNTOPT_NOQUOTA "noquota" /* don't use any quota on this partition */
  62. #define MNTOPT_USRQUOTA "usrquota" /* use userquota on this partition */
  63. #define MNTOPT_GRPQUOTA "grpquota" /* use groupquota on this partition */
  64. /* none defined yet */
  65. __BEGIN_DECLS
  66. struct mntent{
  67. char *mnt_fsname;
  68. char *mnt_dir;
  69. char *mnt_type;
  70. char *mnt_opts;
  71. int mnt_freq;
  72. int mnt_passno;
  73. };
  74. __END_DECLS
  75. #define __need_file
  76. #include <stdio.h>
  77. __BEGIN_DECLS
  78. extern FILE *setmntent __P ((__const char *__filep,
  79. __const char *__type));
  80. extern struct mntent
  81. *getmntent __P ((FILE *__filep));
  82. extern int addmntent __P ((FILE *__filep,
  83. __const struct mntent *__mnt));
  84. extern char *hasmntopt __P ((__const struct mntent *__mnt,
  85. __const char *__opt));
  86. extern int endmntent __P ((FILE *__filep));
  87. __END_DECLS
  88. #endif /* _MNTENT_H */