VirtualBox

Changeset 85221 in vbox for trunk/src/VBox/Frontends


Ignore:
Timestamp:
Jul 11, 2020 4:13:15 PM (4 years ago)
Author:
vboxsync
Message:

vd.h,VBoxInternalManager.cpp: It is certifiably insane to use 3 letter value names for a C enum like VDISKPARTTYPE. Clang 11 complains that it clashes with the MBR and EPT types in the Main API when vd.h is included together with it. bugref:9790

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VBoxManage/VBoxInternalManage.cpp

    r82968 r85221  
    124124{
    125125    /** partitioning type - MBR or GPT */
    126     VDISKPARTTYPE uPartitioningType;
     126    VDISKPARTTYPE   uPartitioningType;
    127127    unsigned        cPartitions;
    128128    HOSTPARTITION   aPartitions[HOSTPARTITION_MAX];
     
    759759    if (aBuffer[450] == 0xEE)/* check the sign of the GPT disk*/
    760760    {
    761         partitioningType = GPT;
    762         pPart->uPartitioningType = GPT;//partitioningType;
     761        partitioningType = VDISKPARTTYPE_GPT;
     762        pPart->uPartitioningType = VDISKPARTTYPE_GPT;//partitioningType;
    763763
    764764        if (aBuffer[510] != 0x55 || aBuffer[511] != 0xaa)
     
    875875    else
    876876    {
    877         partitioningType = MBR;
    878         pPart->uPartitioningType = MBR;//partitioningType;
     877        partitioningType = VDISKPARTTYPE_MBR;
     878        pPart->uPartitioningType = VDISKPARTTYPE_MBR;//partitioningType;
    879879
    880880        if (aBuffer[510] != 0x55 || aBuffer[511] != 0xaa)
     
    10351035
    10361036    /* Fill out partitioning location info for backup GPT. */
    1037     if (partitioningType == GPT)
     1037    if (partitioningType == VDISKPARTTYPE_GPT)
    10381038    {
    10391039        pPart->aPartitions[pPart->cPartitions-1].uPartDataStart = lastUsableLBA+1;
     
    17751775                if (!RawDescriptor.pPartDescs[i].cbData)
    17761776                {
    1777                     if (RawDescriptor.uPartitioningType == MBR)
     1777                    if (RawDescriptor.uPartitioningType == VDISKPARTTYPE_MBR)
    17781778                    {
    17791779                        RTMsgError("MBR/EPT overlaps with data area");
     
    17811781                        goto out;
    17821782                    }
    1783                     else
     1783                    if (RawDescriptor.cPartDescs != i+1)
    17841784                    {
    1785                         if (RawDescriptor.cPartDescs != i+1)
    1786                         {
    1787                             RTMsgError("GPT overlaps with data area");
    1788                             vrc = VERR_INVALID_PARAMETER;
    1789                             goto out;
    1790                         }
     1785                        RTMsgError("GPT overlaps with data area");
     1786                        vrc = VERR_INVALID_PARAMETER;
     1787                        goto out;
    17911788                    }
    17921789                }
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette