diff options
author | Christopher Faylor <me@cgf.cx> | 2000-06-13 16:48:37 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2000-06-13 16:48:37 +0000 |
commit | 024afd70d6454efb12c94eaa092ff1fbcd1d5030 (patch) | |
tree | 5b805d07b4618f05ab0e2d27259837bac73af321 /winsup/cygwin | |
parent | fe871355b5ef09d503dd1fbc6330731a802b6fcd (diff) | |
download | cygnal-024afd70d6454efb12c94eaa092ff1fbcd1d5030.tar.gz cygnal-024afd70d6454efb12c94eaa092ff1fbcd1d5030.tar.bz2 cygnal-024afd70d6454efb12c94eaa092ff1fbcd1d5030.zip |
* path.cc (mount_info::add_item): The previous patch can't handle the case of
overwriting a mount entry.
Diffstat (limited to 'winsup/cygwin')
-rw-r--r-- | winsup/cygwin/ChangeLog | 5 | ||||
-rw-r--r-- | winsup/cygwin/path.cc | 14 |
2 files changed, 13 insertions, 6 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index eb6afc7ab..23db82bd6 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +Tue Jun 13 12:41:41 2000 Kazuhiro Fujieda <fujieda@jaist.ac.jp> + + * path.cc (mount_info::add_item): The previous patch can't handle + the case of overwriting a mount entry. + Tue Jun 13 00:17:04 2000 Christopher Faylor <cgf@cygnus.com> * thread.h: Shorten "current_directory" variables to "cwd_*" diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc index f491be014..2b7e58be0 100644 --- a/winsup/cygwin/path.cc +++ b/winsup/cygwin/path.cc @@ -1645,13 +1645,15 @@ mount_info::add_item (const char *native, const char *posix, unsigned mountflags break; } - /* Can't add more than MAX_MOUNTS. */ - if (i == nmounts && nmounts < MAX_MOUNTS) - i = nmounts++; - else + if (i == nmounts) { - set_errno (EMFILE); - return -1; + if (nmounts < MAX_MOUNTS) + i = nmounts++; + else + { + set_errno (EMFILE); + return -1; + } } if (reg_p && add_reg_mount (nativetmp, posixtmp, mountflags)) |