Skip to content
  • Mike Fleetwood's avatar
    Stop relying on specific values of PED_PARTITION_* enum · 3b3d8e44
    Mike Fleetwood authored and Curtis Gedak's avatar Curtis Gedak committed
    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.
    3b3d8e44