* path.cc (mount_info::init): First try to fetch mount points from

fstab files.  Fallback to registry if none exists.
	(skip_ws): New inline function.
	(find_ws): Ditto.
	(struct opt): New structure for mount options.
	(read_flags): New static function to convert a mount flags string into
	a flag value.
	(mount_info::from_fstab_line): New method to create a mount table
	entry from a fstab line.
	(mount_info::from_fstab): New method to read fstab file.
	* shared_info.h (mount_info::from_fstab_line): Declare.
	(mount_info::from_fstab): Declare.
This commit is contained in:
Corinna Vinschen
2008-04-02 17:45:32 +00:00
parent c8cd2f2255
commit 85340bc03d
3 changed files with 215 additions and 0 deletions

View File

@@ -74,6 +74,8 @@ class mount_info
int add_item (const char *dev, const char *path, unsigned flags, int reg_p);
int del_item (const char *path, unsigned flags, int reg_p);
bool from_fstab_line (char *line, bool user);
bool from_fstab (bool user);
void from_registry ();
int add_reg_mount (const char * native_path, const char * posix_path,
unsigned mountflags);