[parted-devel] libparted/arch/linux.c ext_range patch
kordex
kordex at gmail.com
Thu Nov 24 08:46:40 UTC 2011
After some testing I found that following still requires attention:
Parted with the ext_range patch can create devices in /dev/ for more
than 16 partitions, but does not remove them after the partitions are
deleted, even the patch bellow is applied.
Br,
-Mikko Kortelainen
On Wed, Nov 23, 2011 at 15:29, kordex <kordex at gmail.com> wrote:
> Following should be merged I think:
>
> On Tue, Nov 22, 2011 at 09:41, Petr Uzel <petr.uzel at suse.cz> wrote:
>> On Mon, Nov 21, 2011 at 06:39:01PM +0200, kordex at gmail.com wrote:
>>> Hello,
>>
>> Hi,
>>
>>>
>>> Your patch bellow seems to do the trick: over 16 GPT defined
>>> partitions are now visible under /dev and /proc/partitions
>>
>> Thanks for testing.
>>
>> If you could send short writeup about the problem and testing this
>> patch to parted-devel mailing list, that would be highly appreciated.
>>
>> Regards,
>>
>> Petr
>>
>>>
>>> > diff --git a/libparted/arch/linux.c b/libparted/arch/linux.c
>>> > index bc42750..5eb1471 100644
>>> > --- a/libparted/arch/linux.c
>>> > +++ b/libparted/arch/linux.c
>>> > @@ -2416,7 +2416,7 @@ _blkpg_remove_partition (PedDisk* disk, int n)
>>> >
>>> > /*
>>> > * The number of partitions that a device can have depends on the
>>> kernel.
>>> > - * If we don't find this value in /sys/block/DEV/range, we will
>>> use our own
>>> > + * If we don't find this value in /sys/block/DEV/ext_range, we
>>> will use our own
>>> > * value.
>>> > */
>>> > static unsigned int
>>> > @@ -2427,7 +2427,7 @@ _device_get_partition_range(PedDevice* dev)
>>> > FILE* fp;
>>> > bool ok;
>>> >
>>> > - r = snprintf(path, sizeof(path), "/sys/block/%s/range",
>>> > + r = snprintf(path, sizeof(path), "/sys/block/%s/ext_range",
>>> > last_component(dev->path));
>>> > if (r < 0 || r >= sizeof(path))
>>> > return MAX_NUM_PARTS;
>>
>> Petr
>>
>> --
>> Petr Uzel
>> IRC: ptr_uzl @ freenode
>>
>
More information about the parted-devel
mailing list