Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/winsup
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2005-08-24 18:17:56 +0400
committerChristopher Faylor <me@cgf.cx>2005-08-24 18:17:56 +0400
commit7871cd8c5de7fab03d615720c40468700d71ebd4 (patch)
treeb3d9106001c8fc58b868c6543e533855e3b5073c /winsup
parent14c4d65ef1240b1c18db06c3030b4e0830b0c701 (diff)
* path.cc (path_conv::check): Fill in fileattr for /dev, defaulting to
directory if /dev doesn't actually exist. (win32_device_name): Don't consider FH_DEV to be a device since it's really a directory which should go through mount processing.
Diffstat (limited to 'winsup')
-rw-r--r--winsup/cygwin/ChangeLog7
-rw-r--r--winsup/cygwin/path.cc10
2 files changed, 14 insertions, 3 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 30012a061..c97cb6130 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,5 +1,12 @@
2005-08-24 Christopher Faylor <cgf@timesys.com>
+ * path.cc (path_conv::check): Fill in fileattr for /dev, defaulting to
+ directory if /dev doesn't actually exist.
+ (win32_device_name): Don't consider FH_DEV to be a device since it's
+ really a directory which should go through mount processing.
+
+2005-08-24 Christopher Faylor <cgf@timesys.com>
+
* cygheap.h (cygheap_types): Add HEAP_COMMUNE.
* fhandler_proc.cc: Use cygheap rather than user heap for allocation of
filebuf throughout.
diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc
index 787251d72..7f169fdf4 100644
--- a/winsup/cygwin/path.cc
+++ b/winsup/cygwin/path.cc
@@ -641,9 +641,13 @@ path_conv::check (const char *src, unsigned opt,
}
else if (dev == FH_DEV)
{
- fileattr = FILE_ATTRIBUTE_DIRECTORY;
dev.devn = FH_FS;
- goto out;
+ fileattr = GetFileAttributes (this->path);
+ if (!component && fileattr == INVALID_FILE_ATTRIBUTES)
+ {
+ fileattr = FILE_ATTRIBUTE_DIRECTORY | FILE_ATTRIBUTE_READONLY;
+ goto out;
+ }
}
else if (isvirtual_dev (dev.devn))
{
@@ -1053,7 +1057,7 @@ static bool
win32_device_name (const char *src_path, char *win32_path, device& dev)
{
dev.parse (src_path);
- if (dev.devn == FH_FS)
+ if (dev == FH_FS || dev == FH_DEV)
return false;
strcpy (win32_path, dev.native);
return true;