Mailing-List: contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-developers-owner AT sourceware DOT cygnus DOT com Delivered-To: mailing list cygwin-developers AT sourceware DOT cygnus DOT com To: cygwin-developers AT sourceware DOT cygnus DOT com Subject: Re: mount doesn't complain about missing "mount directory" any more? References: <20000613213415 DOT A20386 AT cygnus DOT com> <20000613225819 DOT A12800 AT cygnus DOT com> Mime-Version: 1.0 (generated by tm-edit 7.106) Content-Type: text/plain; charset=US-ASCII From: Kazuhiro Fujieda Date: 14 Jun 2000 13:07:17 +0900 In-Reply-To: Chris Faylor's message of Tue, 13 Jun 2000 22:58:20 -0400 Message-ID: Lines: 49 X-Mailer: Gnus v5.3/Emacs 19.34 >>> On Tue, 13 Jun 2000 22:58:20 -0400 >>> Chris Faylor said: > Ok. I'm sorry. I didn't remember that -f avoided the error. Is this > new or has it always been like that? The latter. The `mount' with -f had avoided the error before my patch was applied. > Btw, it sure would be nice if you could do this: > > mount c:/foo /foo > umount c:/foo #doesn't work (but would be nice) > umount /foo #work > > If you have an idle moment it would be nice to add this functionality to > mount to make it behave more like the UNIX version. `umount' has already reject win32 paths in del_reg_mount(). Anyway I removed the meaningless comparison in mount_info::del_item(). ChangeLog: 2000-06-14 Kazuhiro Fujieda * path.cc (mount_info::del_item): Eliminate the comparison between the target mount point and native paths of mount entries. Index: path.cc =================================================================== RCS file: /cvs/src/src/winsup/cygwin/path.cc,v retrieving revision 1.30 diff -u -p -r1.30 path.cc --- path.cc 2000/06/13 16:48:37 1.30 +++ path.cc 2000/06/14 03:48:51 @@ -1696,9 +1696,7 @@ mount_info::del_item (const char *path, for (int i = 0; i < nmounts; i++) { - /* Delete if paths and mount locations match. */ - if ((strcasematch (mount[i].posix_path, pathtmp) - || strcasematch (mount[i].native_path, pathtmp)) && + if (strcasematch (mount[i].posix_path, pathtmp) && (mount[i].flags & MOUNT_SYSTEM) == (flags & MOUNT_SYSTEM)) { nmounts--; /* One less mount table entry */ ____ | AIST Kazuhiro Fujieda | HOKURIKU School of Information Science o_/ 1990 Japan Advanced Institute of Science and Technology