summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/fhandler_mem.cc
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/fhandler_mem.cc')
-rw-r--r--winsup/cygwin/fhandler_mem.cc14
1 files changed, 3 insertions, 11 deletions
diff --git a/winsup/cygwin/fhandler_mem.cc b/winsup/cygwin/fhandler_mem.cc
index d99ab1c3d..7a839e99d 100644
--- a/winsup/cygwin/fhandler_mem.cc
+++ b/winsup/cygwin/fhandler_mem.cc
@@ -403,23 +403,15 @@ fhandler_dev_mem::fixup_mmap_after_fork (HANDLE h, DWORD access, DWORD offset,
}
int
-fhandler_dev_mem::fstat (struct stat *buf)
+fhandler_dev_mem::fstat (struct stat *buf, path_conv *pc)
{
- if (!buf)
- {
- set_errno (EINVAL);
- return -1;
- }
-
- memset (buf, 0, sizeof *buf);
+ this->fhandler_base::fstat (buf, pc);
buf->st_mode = S_IFCHR;
- if (!wincap.has_physical_mem_access ())
+ if (wincap.has_physical_mem_access ())
buf->st_mode |= S_IRUSR | S_IWUSR |
S_IRGRP | S_IWGRP |
S_IROTH | S_IWOTH;
- buf->st_nlink = 1;
buf->st_blksize = getpagesize ();
- buf->st_dev = buf->st_rdev = get_device () << 8 | (unit & 0xff);
return 0;
}