VirtualBox

Changeset 56910 in vbox


Ignore:
Timestamp:
Jul 10, 2015 9:02:23 AM (10 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
101600
Message:

Main/VBoxManage: cleanup in raw partition handling, eliminating redundant code

File:
1 edited

Legend:

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

    r56391 r56910  
    12581258        }
    12591259        else
     1260        {
     1261            if (fRelative)
     1262            {
     1263                RTMsgError("The -relative parameter is invalid for raw images");
     1264                vrc = VERR_INVALID_PARAMETER;
     1265                goto out;
     1266            }
    12601267            vrc = VINF_SUCCESS;
     1268        }
    12611269    }
    12621270#elif defined(RT_OS_LINUX)
     
    16181626                if (fRelative)
    16191627                {
    1620 #if defined(RT_OS_LINUX) || defined(RT_OS_FREEBSD)
     1628#if defined(RT_OS_LINUX) || defined(RT_OS_DARWIN) || defined(RT_OS_FREEBSD)
    16211629                    /* Refer to the correct partition and use offset 0. */
    16221630                    char *psz;
     
    16241632#if defined(RT_OS_LINUX)
    16251633                                 "%s%u",
    1626 #elif defined(RT_OS_FREEBSD)
     1634#elif defined(RT_OS_DARWIN) || defined(RT_OS_FREEBSD)
    16271635                                 "%ss%u",
    16281636#endif
     
    16341642                        RTMsgError("Cannot create reference to individual partition %u, rc=%Rrc",
    16351643                                   partitions.aPartitions[i].uIndex, vrc);
    1636                         goto out;
    1637                     }
    1638                     pszRawName = psz;
    1639                     uStartOffset = 0;
    1640 #elif defined(RT_OS_DARWIN)
    1641                     /* Refer to the correct partition and use offset 0. */
    1642                     char *psz;
    1643                     RTStrAPrintf(&psz, "%ss%u", rawdisk.c_str(),
    1644                                  partitions.aPartitions[i].uIndex);
    1645                     if (!psz)
    1646                     {
    1647                         vrc = VERR_NO_STR_MEMORY;
    1648                         RTMsgError("Cannot create reference to individual partition %u, rc=%Rrc",
    1649                                  partitions.aPartitions[i].uIndex, vrc);
    16501644                        goto out;
    16511645                    }
Note: See TracChangeset for help on using the changeset viewer.

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