From b2867a68b9f94402e2afba49de978d9e8f9abaeb Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Thu, 23 Jun 2016 16:56:41 +0200 Subject: Handle up to 63 partitions per drive Revamp device parsing code. Introducing support for more partitions into the shilka-generated parser has the unfortunate side-effect of raising the size of the DLL by almost 2 Megs. Therefore we split out the handling for /dev/sdXY devices into a tiny bit of hand-written code. While at it, remove some unused cruft from devices.* and generally clean up the device class to provide access methods instead of direct access to members. Signed-off-by: Corinna Vinschen --- winsup/cygwin/fhandler_disk_file.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'winsup/cygwin/fhandler_disk_file.cc') diff --git a/winsup/cygwin/fhandler_disk_file.cc b/winsup/cygwin/fhandler_disk_file.cc index 1d5b7dee5..0d243c411 100644 --- a/winsup/cygwin/fhandler_disk_file.cc +++ b/winsup/cygwin/fhandler_disk_file.cc @@ -513,7 +513,7 @@ fhandler_base::fstat_helper (struct stat *buf) else { buf->st_dev = buf->st_rdev = dev (); - buf->st_mode = dev ().mode; + buf->st_mode = dev ().mode (); buf->st_size = 0; } } @@ -532,7 +532,7 @@ fhandler_base::fstat_helper (struct stat *buf) else if (is_fs_special ()) { buf->st_dev = buf->st_rdev = dev (); - buf->st_mode = dev ().mode; + buf->st_mode = dev ().mode (); buf->st_size = 0; } else @@ -2091,7 +2091,7 @@ fhandler_disk_file::readdir_helper (DIR *dir, dirent *de, DWORD w32_err, else if (fpath.is_fs_special ()) { fname->Length -= 4 * sizeof (WCHAR); - de->d_type = S_ISCHR (fpath.dev.mode) ? DT_CHR : DT_BLK; + de->d_type = S_ISCHR (fpath.dev.mode ()) ? DT_CHR : DT_BLK; } } } -- cgit v1.2.3