diff options
author | Christopher Faylor <me@cgf.cx> | 2004-12-26 02:10:30 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2004-12-26 02:10:30 +0000 |
commit | 8711eddd80efc5f05f19da613ce3ad7ebc66aa35 (patch) | |
tree | 89fa306d8a4bd626b9e23af318788c18c07efcd7 /winsup/cygwin/fhandler_disk_file.cc | |
parent | 9a3412eea8a2aa2daafa031f2e94f7049c1de202 (diff) | |
download | cygnal-8711eddd80efc5f05f19da613ce3ad7ebc66aa35.tar.gz cygnal-8711eddd80efc5f05f19da613ce3ad7ebc66aa35.tar.bz2 cygnal-8711eddd80efc5f05f19da613ce3ad7ebc66aa35.zip |
* fhandler.cc (fhandler_base::fchmod): Do the right thing when changing an "on
disk" device or fifo.
(fhandler_base::fchown): Ditto for changing ownership.
* fhandler_disk_file.cc (fhandler_base::fstat_helper): Accommodate device files
on ntfs partitions.
* path.cc (path_conv::check): Use isfs function to figure out if a path exists
on a filesystem to make sure that device files are caught.
Diffstat (limited to 'winsup/cygwin/fhandler_disk_file.cc')
-rw-r--r-- | winsup/cygwin/fhandler_disk_file.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/winsup/cygwin/fhandler_disk_file.cc b/winsup/cygwin/fhandler_disk_file.cc index ebf92772a..7fc6a14a9 100644 --- a/winsup/cygwin/fhandler_disk_file.cc +++ b/winsup/cygwin/fhandler_disk_file.cc @@ -300,8 +300,15 @@ fhandler_base::fstat_helper (struct __stat64 *buf, if (pc.has_attribute (FILE_ATTRIBUTE_READONLY) && !pc.issymlink ()) buf->st_mode &= ~(S_IWUSR | S_IWGRP | S_IWOTH); - if (!(buf->st_mode & S_IFMT)) + if (buf->st_mode & S_IFMT) + /* nothing */; + else if (!is_fs_special ()) buf->st_mode |= S_IFREG; + else + { + buf->st_dev = dev (); + buf->st_mode = dev ().mode; + } } else { |