Christopher Faylor <cgf@timesys.com>
* path.cc (mount_info::conv_to_posix_path): Add return.
This commit is contained in:
parent
718123fada
commit
1940656ab9
|
@ -1,3 +1,8 @@
|
||||||
|
2004-05-07 Pierre Humblet <pierre.humblet@ieee.org>
|
||||||
|
Christopher Faylor <cgf@timesys.com>
|
||||||
|
|
||||||
|
* path.cc (mount_info::conv_to_posix_path): Add return.
|
||||||
|
|
||||||
2004-05-06 Pierre Humblet <pierre.humblet@ieee.org>
|
2004-05-06 Pierre Humblet <pierre.humblet@ieee.org>
|
||||||
|
|
||||||
* path.cc (path_conv::check): Strip trailing dots and spaces and
|
* path.cc (path_conv::check): Strip trailing dots and spaces and
|
||||||
|
|
|
@ -1693,7 +1693,9 @@ mount_info::conv_to_posix_path (const char *src_path, char *posix_path,
|
||||||
|
|
||||||
if (!cygheap->root.exists ())
|
if (!cygheap->root.exists ())
|
||||||
/* nothing */;
|
/* nothing */;
|
||||||
else if (cygheap->root.ischroot_native (pathbuf))
|
else if (!cygheap->root.ischroot_native (pathbuf))
|
||||||
|
return ENOENT;
|
||||||
|
else
|
||||||
{
|
{
|
||||||
const char *p = pathbuf + cygheap->root.native_length ();
|
const char *p = pathbuf + cygheap->root.native_length ();
|
||||||
if (*p)
|
if (*p)
|
||||||
|
@ -1703,9 +1705,8 @@ mount_info::conv_to_posix_path (const char *src_path, char *posix_path,
|
||||||
posix_path[0] = '/';
|
posix_path[0] = '/';
|
||||||
posix_path[1] = '\0';
|
posix_path[1] = '\0';
|
||||||
}
|
}
|
||||||
|
goto out;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
return ENOENT;
|
|
||||||
|
|
||||||
/* Not in the database. This should [theoretically] only happen if either
|
/* Not in the database. This should [theoretically] only happen if either
|
||||||
the path begins with //, or / isn't mounted, or the path has a drive
|
the path begins with //, or / isn't mounted, or the path has a drive
|
||||||
|
|
|
@ -604,22 +604,33 @@ pthread::cancelable_wait (HANDLE object, DWORD timeout, const bool do_cancel,
|
||||||
because WaitForMultipleObjects will return the smallest index
|
because WaitForMultipleObjects will return the smallest index
|
||||||
if both objects are signaled. */
|
if both objects are signaled. */
|
||||||
wait_objects[num++] = object;
|
wait_objects[num++] = object;
|
||||||
if (is_good_object (&thread) &&
|
DWORD cancel_n;
|
||||||
thread->cancelstate != PTHREAD_CANCEL_DISABLE)
|
if (!is_good_object (&thread) ||
|
||||||
wait_objects[num++] = thread->cancel_event;
|
thread->cancelstate == PTHREAD_CANCEL_DISABLE)
|
||||||
if (do_sig_wait)
|
cancel_n = (DWORD) -1;
|
||||||
wait_objects[num++] = signal_arrived;
|
else
|
||||||
|
{
|
||||||
|
cancel_n = num++;
|
||||||
|
wait_objects[cancel_n] = thread->cancel_event;
|
||||||
|
}
|
||||||
|
|
||||||
|
DWORD sig_n;
|
||||||
|
if (!do_sig_wait || &_my_tls != _main_tls)
|
||||||
|
sig_n = (DWORD) -1;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
sig_n = num++;
|
||||||
|
wait_objects[sig_n] = signal_arrived;
|
||||||
|
}
|
||||||
|
|
||||||
res = WaitForMultipleObjects (num, wait_objects, FALSE, timeout);
|
res = WaitForMultipleObjects (num, wait_objects, FALSE, timeout);
|
||||||
if (res == WAIT_CANCELED)
|
if (res == sig_n - WAIT_OBJECT_0)
|
||||||
{
|
res = WAIT_SIGNALED;
|
||||||
if (num == 3 || !do_sig_wait)
|
else if (res == cancel_n - WAIT_OBJECT_0)
|
||||||
{
|
{
|
||||||
if (do_cancel)
|
if (do_cancel)
|
||||||
pthread::static_cancel_self ();
|
pthread::static_cancel_self ();
|
||||||
}
|
res = WAIT_CANCELED;
|
||||||
else
|
|
||||||
res = WAIT_SIGNALED;
|
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue