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.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'winsup/cygwin/fhandler.h') diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h index 94fe0f9db..9f9d9bd8f 100644 --- a/winsup/cygwin/fhandler.h +++ b/winsup/cygwin/fhandler.h @@ -425,7 +425,7 @@ public: virtual select_record *select_except (select_stuff *); virtual const char *get_native_name () { - return dev ().native; + return dev ().native (); } virtual bg_check_types bg_check (int) {return bg_ok;} void clear_readahead () @@ -1059,8 +1059,9 @@ class fhandler_disk_file: public fhandler_base class fhandler_dev: public fhandler_disk_file { - const struct device *devidx; + const struct _device *devidx; bool dir_exists; + int drive, part; public: fhandler_dev (); int open (int flags, mode_t mode); @@ -1569,7 +1570,7 @@ class fhandler_pty_slave: public fhandler_pty_common void fixup_after_exec (); select_record *select_read (select_stuff *); - virtual char const *ttyname () { return pc.dev.name; } + virtual char const *ttyname () { return pc.dev.name (); } int __reg2 fstat (struct stat *buf); int __reg3 facl (int, int, struct acl *); int __reg1 fchmod (mode_t mode); -- cgit v1.2.3