[Parted-maintainers] [parted-devel] a problem about 100% indicating the whole disk

zhuyj zyjzyj2000 at gmail.com
Wed Nov 6 06:22:59 UTC 2013


On 11/06/2013 01:58 AM, Phillip Susi wrote:
> On 10/31/2013 6:10 AM, zhuyj wrote:
>> I checked the source code, and I found that it is difficult to modify.
>> Since 100% mean to use the whole disk, so sector is correct to be equal
>> to dev->length. And radius is equal to 0 since unit_size is power of 2.
>> So if we use 100% in the source code, it is difficult to avoid this
>> failure.
>>
>> Thus I made the following patch. The main object is to replace 100% with
>> -1. Finally, this failure can be avoided.
> That only fixes it for 100%, other percentages will still get the
> incorrect treatment.  This should be easily fixed:
>
Hi, Phillip

Thanks for your reply.
I made tests. Other percentages will not get the incorrect treatment.
Only when percentage is 100%, this problem will appear, that is, parted 
fails to work.

Namely, other percentages, such as 99%, 90% and so on, can work well.

So I think your patch is unfair to other percentages.

It is enough to 100%. So it is better to fix for 100%. Please merge my 
patch. Thanks a lot.

If you are interested in this problem, I will provide steps and ISO file 
to reproduce this problem.

Best Regards!
Zhu Yanjun



More information about the Parted-maintainers mailing list