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:
@ -239,7 +239,7 @@ class path_conv
|
||||
path_flags (0), suffix (NULL), posix_path (NULL), error (0),
|
||||
dev (in_dev)
|
||||
{
|
||||
set_path (in_dev.native);
|
||||
set_path (in_dev.native ());
|
||||
}
|
||||
|
||||
path_conv (int, const char *src, unsigned opt = PC_SYM_FOLLOW,
|
||||
@ -322,6 +322,10 @@ class path_conv
|
||||
{
|
||||
free_strings ();
|
||||
memcpy (this, &pc, sizeof pc);
|
||||
/* The device info might contain pointers to allocated strings, in
|
||||
contrast to statically allocated strings. Calling device::dup()
|
||||
will duplicate the string if the source was allocated. */
|
||||
dev.dup ();
|
||||
path = cstrdup (in_path);
|
||||
conv_handle.dup (pc.conv_handle);
|
||||
posix_path = cstrdup(pc.posix_path);
|
||||
|
Reference in New Issue
Block a user