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 <corinna@vinschen.de>
This commit is contained in:
Corinna Vinschen
2016-06-23 16:56:41 +02:00
parent bceb8ebebb
commit b2867a68b9
21 changed files with 5268 additions and 40170 deletions

View File

@ -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);