Stop relying on specific values of PED_PARTITION_* enum
The expressions used in the call to Set() were comparing lp_partition->type to 0 for the type parameter and passing it as a bool for the inside_extended parameter. Libparted lp_partition->type is actually an enumeration. The code was only working because of the specific values assigned to the symbolic names, PED_PARTITION_NORMAL = 0 and PED_PARTITION_EXTENDED is non-zero (true). Make the code use the symbolic names and not depend on the actual enumeration values, which should be considered changeable and private to libparted.
parent
7870a92b
Please register or sign in to comment