]>
Commit | Line | Data |
---|---|---|
8c61f43a KZ |
1 | #ifndef MOUNT_FSTAB_H |
2 | #define MOUNT_FSTAB_H | |
3 | ||
8174c9ca | 4 | #include "mount_mntent.h" |
c9cf41e4 KZ |
5 | |
6 | #ifdef HAVE_LIBMOUNT_MOUNT | |
7 | #define USE_UNSTABLE_LIBMOUNT_API | |
2a1f429a | 8 | #include <libmount.h> |
68164f6c | 9 | extern struct libmnt_lock *init_libmount_lock(const char *filename); |
c9cf41e4 KZ |
10 | #endif |
11 | ||
fd6b7a7f | 12 | int mtab_is_writable(void); |
978ba388 | 13 | int mtab_is_a_symlink(void); |
fd6b7a7f | 14 | int mtab_does_not_exist(void); |
c3327025 | 15 | void reset_mtab_info(void); |
d03dd608 | 16 | int is_mounted_once(const char *name); |
6dbe3af9 | 17 | |
fd6b7a7f | 18 | struct mntentchn { |
66ee8158 | 19 | struct mntentchn *nxt, *prev; |
d26aa358 | 20 | struct my_mntent m; |
fd6b7a7f | 21 | }; |
6dbe3af9 | 22 | |
fd6b7a7f KZ |
23 | struct mntentchn *mtab_head (void); |
24 | struct mntentchn *getmntfile (const char *name); | |
5d79666f | 25 | struct mntentchn *getmntfilebackward (const char *name, struct mntentchn *mcprev); |
fd6b7a7f | 26 | struct mntentchn *getmntoptfile (const char *file); |
d03dd608 KZ |
27 | struct mntentchn *getmntdirbackward (const char *dir, struct mntentchn *mc); |
28 | struct mntentchn *getmntdevbackward (const char *dev, struct mntentchn *mc); | |
6dbe3af9 | 29 | |
fd6b7a7f | 30 | struct mntentchn *fstab_head (void); |
8c61f43a KZ |
31 | struct mntentchn *getfs_by_dir (const char *dir); |
32 | struct mntentchn *getfs_by_spec (const char *spec); | |
33 | struct mntentchn *getfs_by_devname (const char *devname); | |
448d1248 | 34 | struct mntentchn *getfs_by_devdir (const char *dev, const char *dir); |
8c61f43a KZ |
35 | struct mntentchn *getfs_by_uuid (const char *uuid); |
36 | struct mntentchn *getfs_by_label (const char *label); | |
6dbe3af9 | 37 | |
fd6b7a7f KZ |
38 | void lock_mtab (void); |
39 | void unlock_mtab (void); | |
d26aa358 | 40 | void update_mtab (const char *special, struct my_mntent *with); |
8c61f43a KZ |
41 | |
42 | #endif /* MOUNT_FSTAB_H */ |