Re: [PATCH 1/3] libfdisk: Add support for altering GPT size

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks Mike. I'll attend to those issues in the morning and resubmit.

On 11 May 2016 at 17:39, Mike Frysinger <vapier@xxxxxxxxxx> wrote:
> On 11 May 2016 15:54, Sassan Panahinejad wrote:
>> This is useful in two situations:
>>
>> 1. More than 128 partitions are required. Or
>>
>> 2. The partition table must be restricted in size, such as when a system
>> expects to find a bootloader at a location that would otherwise overlap the
>> partition table.
>>
>> The gdisk partitioner supports this feature.
>>
>> libfdisk is already capable of reading and writing partition tables of any
>> size, but previously could only create ones of 128 entries and could not
>> resize.
>>
>> This change should be fairly safe, as it has no effect unless explicitly
>> activated.
>
> i'm not super familiar with the codebase, but these look pretty nice.  thanks!
>
>> +     fdisk_info(cxt, _("Partition table length changed from %u to %u."), old, new);
>
> old & new are unsigned long, so you'll want %lu
>
>> +int fdisk_set_disklabel_length(struct fdisk_context *cxt, unsigned long entries)
>> +{
>> +     if (!cxt || !cxt->label)
>> +             return -EINVAL;
>> +     if (!cxt->label->op->set_length)
>> +             return -ENOSYS;
>> +
>> +     DBG(CXT, ul_debugobj(cxt, "setting %s label length", cxt->label->name));
>
> want to include |entries| in the debug output too ?
> -mike
--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux