VirtualBox

Changeset 36303 in vbox


Ignore:
Timestamp:
Mar 17, 2011 12:41:26 PM (14 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
70610
Message:

FE/VBoxManage: Introduce -relative parameter for FreeBSD (Thanks to Dmytro Pryanyshnikov and Bernhard Froehlich)

File:
1 edited

Legend:

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

    r36069 r36303  
    186186          "       The diskname is on Linux e.g. /dev/sda, and on Windows e.g.\n"
    187187          "       \\\\.\\PhysicalDrive0).\n"
    188           "       On Linux host the parameter -relative causes a VMDK file to be created\n"
    189           "       which refers to individual partitions instead to the entire disk.\n"
     188          "       On Linux or FreeBSD host the parameter -relative causes a VMDK file to\n"
     189          "       be created which refers to individual partitions instead to the entire\n"
     190          "       disk.\n"
    190191          "       The necessary partition numbers can be queried with\n"
    191192          "         VBoxManage internalcommands listpartitions\n"
     
    968969            pszPartitions = argv[i];
    969970        }
    970 #ifdef RT_OS_LINUX
     971#if defined(RT_OS_LINUX) || defined(RT_OS_FREEBSD)
    971972        else if (strcmp(argv[i], "-relative") == 0)
    972973        {
    973974            fRelative = true;
    974975        }
    975 #endif /* RT_OS_LINUX */
     976#endif /* RT_OS_LINUX || RT_OS_FREEBSD */
    976977        else
    977978            return errorSyntax(USAGE_CREATERAWVMDK, "Invalid parameter '%s'", argv[i]);
     
    13211322                if (fRelative)
    13221323                {
    1323 #ifdef RT_OS_LINUX
     1324#if defined(RT_OS_LINUX) || defined(RT_OS_FREEBSD)
    13241325                    /* Refer to the correct partition and use offset 0. */
    13251326                    char *psz;
    1326                     RTStrAPrintf(&psz, "%s%u", rawdisk.c_str(),
     1327                    RTStrAPrintf(&psz,
     1328#if defined(RT_OS_LINUX)
     1329                                 "%s%u",
     1330#elif defined(RT_OS_FREEBSD)
     1331                                 "%ss%u",
     1332#endif
     1333                                 rawdisk.c_str(),
    13271334                                 partitions.aPartitions[i].uIndex);
    13281335                    if (!psz)
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