]> git.ipfire.org Git - thirdparty/util-linux.git/blob - mount/fstab.h
Imported from util-linux-2.10s tarball.
[thirdparty/util-linux.git] / mount / fstab.h
1 #include <mntent.h>
2 #define _PATH_FSTAB "/etc/fstab"
3 #ifdef _PATH_MOUNTED
4 #define MOUNTED_LOCK _PATH_MOUNTED "~"
5 #define MOUNTED_TEMP _PATH_MOUNTED ".tmp"
6 #else
7 #define MOUNTED_LOCK "/etc/mtab~"
8 #define MOUNTED_TEMP "/etc/mtab.tmp"
9 #endif
10 #define LOCK_TIMEOUT 10
11
12 int mtab_is_writable(void);
13 int mtab_does_not_exist(void);
14 int mtab_is_a_symlink(void);
15
16 struct mntentchn {
17 struct mntentchn *nxt, *prev;
18 struct mntent m;
19 };
20
21 struct mntentchn *mtab_head (void);
22 struct mntentchn *getmntfile (const char *name);
23 struct mntentchn *getmntoptfile (const char *file);
24 struct mntentchn *getmntfilesbackward (const char *file, struct mntentchn *mc);
25
26 struct mntentchn *fstab_head (void);
27 struct mntentchn *getfsfile (const char *file);
28 struct mntentchn *getfsspec (const char *spec);
29 struct mntentchn *getfsspecfile (const char *spec, const char *file);
30 struct mntentchn *getfsuuidspec (const char *uuid);
31 struct mntentchn *getfsvolspec (const char *label);
32
33 #include <mntent.h>
34 void lock_mtab (void);
35 void unlock_mtab (void);
36 void update_mtab (const char *special, struct mntent *with);