summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/path.cc
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2005-08-24 04:38:39 +0000
committerChristopher Faylor <me@cgf.cx>2005-08-24 04:38:39 +0000
commit14c4d65ef1240b1c18db06c3030b4e0830b0c701 (patch)
tree0a651de83d4520bb1c08dd334792733560733975 /winsup/cygwin/path.cc
parentdb7f135b03afa5f8ee870f87d1727d69dade30ce (diff)
downloadcygnal-14c4d65ef1240b1c18db06c3030b4e0830b0c701.tar.gz
cygnal-14c4d65ef1240b1c18db06c3030b4e0830b0c701.tar.bz2
cygnal-14c4d65ef1240b1c18db06c3030b4e0830b0c701.zip
* cygheap.h (cygheap_types): Add HEAP_COMMUNE.
* fhandler_proc.cc: Use cygheap rather than user heap for allocation of filebuf throughout. * fhandler_registry.cc: Ditto. * fhandler_virtual.cc: Ditto. * fhandler_process.cc: Ditto. (get_mem_values): Use malloc/realloc/free rather than new. * pinfo.cc (_pinfo::commune_send): Allocate on cygwin heap rather than user heap. Avoid calling ReadFile when correct number of characters have been read or suffer buffer corruption. (_pinfo::fd): Allocate on cygwin heap rather than user heap. (_pinfo::fds): Ditto. (_pinfo::root): Ditto. (_pinfo::cwd): Ditto. (_pinfo::cmdline): Ditto. * devices.h (FH_DEV): New define. * devices.in: Detect lone /dev. * devices.cc: Regenerate. * path.cc (path_conv::check): Treat FH_DEV as a special case.
Diffstat (limited to 'winsup/cygwin/path.cc')
-rw-r--r--winsup/cygwin/path.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc
index 2a5ca4608..787251d72 100644
--- a/winsup/cygwin/path.cc
+++ b/winsup/cygwin/path.cc
@@ -634,11 +634,17 @@ path_conv::check (const char *src, unsigned opt,
fileattr = FILE_ATTRIBUTE_DIRECTORY | FILE_ATTRIBUTE_READONLY;
else
{
- dev.devn = FH_FS;
fileattr = GetFileAttributes (this->path);
+ dev.devn = FH_FS;
}
goto out;
}
+ else if (dev == FH_DEV)
+ {
+ fileattr = FILE_ATTRIBUTE_DIRECTORY;
+ dev.devn = FH_FS;
+ goto out;
+ }
else if (isvirtual_dev (dev.devn))
{
/* FIXME: Calling build_fhandler here is not the right way to handle this. */