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.
+2004-12-25 Christopher Faylor <cgf@timesys.com>
+
+ * 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.
+
2004-12-24 Christopher Faylor <cgf@timesys.com>
* child_info.h (CURR_CHILD_INFO_MAGIC): Update.
int
fhandler_base::fchmod (mode_t mode)
{
+ extern int chmod_device (path_conv& pc, mode_t mode);
+ if (pc.is_fs_special ())
+ return chmod_device (pc, mode);
/* By default, just succeeds. */
return 0;
}
int
fhandler_base::fchown (__uid32_t uid, __gid32_t gid)
{
+ if (pc.is_fs_special ())
+ return ((fhandler_disk_file *) this)->fhandler_disk_file::fchown (uid, gid);
/* By default, just succeeds. */
return 0;
}
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
{
return;
}
- if (dev.devn == FH_FS)
+ if (dev.isfs ())
{
if (strncmp (path, "\\\\.\\", 4))
{
ForceCloseHandle (cygheap->pid_handle);
cygheap->pid_handle = NULL;
}
- return;
}
/* Initialize the process table entry for the current task.