path.cc (mount_info::init): Eliminate the mount_slash feature.

(mount_slash): Eliminated.
        (mount_info::read_mounts): Eliminate looking up existing entries. The
        loop for deleting cygpath entries is done only when such entries exist.
        (mount_info::from_registry): Eliminate sorting.
        (mount_info::add_item): Call add_reg_mount if necessary. Check nmounts
        more precisely. Use strcasematch in looking up existing entries.
        (mount_info::del_item): Call del_reg_mount if necessary. Use
        strcasematch. Use memmove instead of memcpy.
        (mount_info::import_v1_registry): Everything is done in this method.
        (mount_info::to_registry): Eliminated.
        (mount_info::from_v1_registry): Eliminated.
        (cygwin_umount): Simply call del_item.
        shared.h: Modify the declaration of add_item and del_item. Remove the
        declaration of from_v1_registry.
This commit is contained in:
Corinna Vinschen
2000-06-08 13:24:52 +00:00
parent 9500a3db90
commit 95bdb4966f
3 changed files with 88 additions and 141 deletions

View File

@ -301,11 +301,10 @@ public:
int had_to_create_mount_areas;
void init ();
int add_item (const char *dev, const char *path, unsigned flags);
int del_item (const char *path, unsigned flags);
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);
void from_registry ();
void from_v1_registry ();
int add_reg_mount (const char * native_path, const char * posix_path,
unsigned mountflags);
int del_reg_mount (const char * posix_path, unsigned mountflags);