util-linux/mount/fstab.h

37 lines
1.1 KiB
C
Raw Normal View History

#include <mntent.h>
#define _PATH_FSTAB "/etc/fstab"
2006-12-06 17:25:39 -06:00
#ifdef _PATH_MOUNTED
#define MOUNTED_LOCK _PATH_MOUNTED "~"
#define MOUNTED_TEMP _PATH_MOUNTED ".tmp"
#else
#define MOUNTED_LOCK "/etc/mtab~"
#define MOUNTED_TEMP "/etc/mtab.tmp"
2006-12-06 17:25:39 -06:00
#endif
2006-12-06 17:25:37 -06:00
#define LOCK_TIMEOUT 10
2006-12-06 17:25:32 -06:00
int mtab_is_writable(void);
int mtab_does_not_exist(void);
int mtab_is_a_symlink(void);
2006-12-06 17:25:32 -06:00
struct mntentchn {
struct mntentchn *nxt, *prev;
struct mntent m;
};
2006-12-06 17:25:32 -06:00
struct mntentchn *mtab_head (void);
struct mntentchn *getmntfile (const char *name);
struct mntentchn *getmntoptfile (const char *file);
struct mntentchn *getmntfilesbackward (const char *file, struct mntentchn *mc);
2006-12-06 17:25:32 -06:00
struct mntentchn *fstab_head (void);
struct mntentchn *getfsfile (const char *file);
struct mntentchn *getfsspec (const char *spec);
struct mntentchn *getfsspecfile (const char *spec, const char *file);
2006-12-06 17:25:37 -06:00
struct mntentchn *getfsuuidspec (const char *uuid);
struct mntentchn *getfsvolspec (const char *label);
2006-12-06 17:25:32 -06:00
#include <mntent.h>
void lock_mtab (void);
void unlock_mtab (void);
void update_mtab (const char *special, struct mntent *with);