VirtualBox

Ignore:
Timestamp:
Aug 10, 2010 3:40:18 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
64639
Message:

Main: use settings struct for machine user data; remove iprt::MiniString::raw() and change all occurences to c_str()

Location:
trunk/src/VBox/Frontends/VBoxManage
Files:
13 edited

Legend:

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

    r31461 r31539  
    269269    /* find a unique number - brute force rulez. */
    270270    Utf8Str KeysUtf8(Keys);
    271     const char *pszKeys = RTStrStripL(KeysUtf8.raw());
     271    const char *pszKeys = RTStrStripL(KeysUtf8.c_str());
    272272    for (unsigned i = 1; i < 1000000; i++)
    273273    {
     
    526526        HDPARENTUUID
    527527    } uuidType;
    528    
     528
    529529    if (!strcmp(argv[0], "sethduuid"))
    530530    {
     
    598598        RTPrintf("Error while setting a new UUID: %Rrc\n", rc);
    599599    else
    600         RTPrintf("UUID changed to: %s\n", uuid.toString().raw());
     600        RTPrintf("UUID changed to: %s\n", uuid.toString().c_str());
    601601
    602602    VDCloseAll(pDisk);
     
    848848        else
    849849        {
    850             return errorSyntax(USAGE_LISTPARTITIONS, "Invalid parameter '%s'", Utf8Str(argv[i]).raw());
     850            return errorSyntax(USAGE_LISTPARTITIONS, "Invalid parameter '%s'", Utf8Str(argv[i]).c_str());
    851851        }
    852852    }
     
    856856
    857857    RTFILE RawFile;
    858     int vrc = RTFileOpen(&RawFile, rawdisk.raw(), RTFILE_O_READ | RTFILE_O_OPEN | RTFILE_O_DENY_WRITE);
     858    int vrc = RTFileOpen(&RawFile, rawdisk.c_str(), RTFILE_O_READ | RTFILE_O_OPEN | RTFILE_O_DENY_WRITE);
    859859    if (RT_FAILURE(vrc))
    860860    {
     
    972972#endif /* RT_OS_LINUX */
    973973        else
    974         {
    975             return errorSyntax(USAGE_CREATERAWVMDK, "Invalid parameter '%s'", Utf8Str(argv[i]).raw());
    976         }
     974            return errorSyntax(USAGE_CREATERAWVMDK, "Invalid parameter '%s'", Utf8Str(argv[i]).c_str());
    977975    }
    978976
     
    988986#endif /* RT_OS_DARWIN */
    989987    RTFILE RawFile;
    990     int vrc = RTFileOpen(&RawFile, rawdisk.raw(), RTFILE_O_READ | RTFILE_O_OPEN | RTFILE_O_DENY_WRITE);
     988    int vrc = RTFileOpen(&RawFile, rawdisk.c_str(), RTFILE_O_READ | RTFILE_O_OPEN | RTFILE_O_DENY_WRITE);
    991989    if (RT_FAILURE(vrc))
    992990    {
    993         RTPrintf("Error opening the raw disk '%s': %Rrc\n", rawdisk.raw(), vrc);
     991        RTPrintf("Error opening the raw disk '%s': %Rrc\n", rawdisk.c_str(), vrc);
    994992        goto out;
    995993    }
     
    10661064            {
    10671065                vrc = RTErrConvertFromErrno(errno);
    1068                 RTPrintf("Error getting the size of the raw disk '%s': %Rrc\n", rawdisk.raw(), vrc);
     1066                RTPrintf("Error getting the size of the raw disk '%s': %Rrc\n", rawdisk.c_str(), vrc);
    10691067                goto out;
    10701068            }
     
    10731071    else
    10741072    {
    1075         RTPrintf("File '%s' is no block device\n", rawdisk.raw());
     1073        RTPrintf("File '%s' is no block device\n", rawdisk.c_str());
    10761074        vrc = VERR_INVALID_PARAMETER;
    10771075        goto out;
     
    11641162    if (!cbSize || cbSize % 512)
    11651163    {
    1166         RTPrintf("Detected size of raw disk '%s' is %s, an invalid value\n", rawdisk.raw(), cbSize);
     1164        RTPrintf("Detected size of raw disk '%s' is %s, an invalid value\n", rawdisk.c_str(), cbSize);
    11671165        vrc = VERR_INVALID_PARAMETER;
    11681166        goto out;
     
    11761174    {
    11771175        RawDescriptor.fRawDisk = true;
    1178         RawDescriptor.pszRawDisk = rawdisk.raw();
     1176        RawDescriptor.pszRawDisk = rawdisk.c_str();
    11791177    }
    11801178    else
     
    12141212        if (RT_FAILURE(vrc))
    12151213        {
    1216             RTPrintf("Error reading the partition information from '%s'\n", rawdisk.raw());
     1214            RTPrintf("Error reading the partition information from '%s'\n", rawdisk.c_str());
    12171215            goto out;
    12181216        }
     
    12451243                if (!pPartDesc)
    12461244                {
    1247                     RTPrintf("Out of memory allocating the partition list for '%s'\n", rawdisk.raw());
     1245                    RTPrintf("Out of memory allocating the partition list for '%s'\n", rawdisk.c_str());
    12481246                    vrc = VERR_NO_MEMORY;
    12491247                    goto out;
     
    12611259                if (!pPartData)
    12621260                {
    1263                     RTPrintf("Out of memory allocating the partition descriptor for '%s'\n", rawdisk.raw());
     1261                    RTPrintf("Out of memory allocating the partition descriptor for '%s'\n", rawdisk.c_str());
    12641262                    vrc = VERR_NO_MEMORY;
    12651263                    goto out;
     
    12691267                if (RT_FAILURE(vrc))
    12701268                {
    1271                     RTPrintf("Cannot read partition data from raw device '%s': %Rrc\n", rawdisk.raw(), vrc);
     1269                    RTPrintf("Cannot read partition data from raw device '%s': %Rrc\n", rawdisk.c_str(), vrc);
    12721270                    goto out;
    12731271                }
     
    13031301
    13041302            /* set up values for non-relative device names */
    1305             const char *pszRawName = rawdisk.raw();
     1303            const char *pszRawName = rawdisk.c_str();
    13061304            uint64_t uStartOffset = partitions.aPartitions[i].uStart * 512;
    13071305
     
    13101308            if (!pPartDesc)
    13111309            {
    1312                 RTPrintf("Out of memory allocating the partition list for '%s'\n", rawdisk.raw());
     1310                RTPrintf("Out of memory allocating the partition list for '%s'\n", rawdisk.c_str());
    13131311                vrc = VERR_NO_MEMORY;
    13141312                goto out;
     
    13221320                    /* Refer to the correct partition and use offset 0. */
    13231321                    char *psz;
    1324                     vrc = RTStrAPrintf(&psz, "%s%u", rawdisk.raw(),
     1322                    vrc = RTStrAPrintf(&psz, "%s%u", rawdisk.c_str(),
    13251323                                       partitions.aPartitions[i].uIndex);
    13261324                    if (RT_FAILURE(vrc))
     
    14461444    LCHS.cHeads = 0;
    14471445    LCHS.cSectors = 0;
    1448     vrc = VDCreateBase(pDisk, "VMDK", Utf8Str(filename).raw(), cbSize,
     1446    vrc = VDCreateBase(pDisk, "VMDK", Utf8Str(filename).c_str(), cbSize,
    14491447                       VD_IMAGE_FLAGS_FIXED | VD_VMDK_IMAGE_FLAGS_RAWDISK,
    14501448                       (char *)&RawDescriptor, &PCHS, &LCHS, NULL,
     
    14551453        goto out;
    14561454    }
    1457     RTPrintf("RAW host disk access VMDK file %s created successfully.\n", Utf8Str(filename).raw());
     1455    RTPrintf("RAW host disk access VMDK file %s created successfully.\n", Utf8Str(filename).c_str());
    14581456
    14591457    VDCloseAll(pDisk);
     
    15141512        else
    15151513        {
    1516             return errorSyntax(USAGE_RENAMEVMDK, "Invalid parameter '%s'", Utf8Str(argv[i]).raw());
     1514            return errorSyntax(USAGE_RENAMEVMDK, "Invalid parameter '%s'", Utf8Str(argv[i]).c_str());
    15171515        }
    15181516    }
     
    15451543    else
    15461544    {
    1547         vrc = VDOpen(pDisk, "VMDK", Utf8Str(src).raw(), VD_OPEN_FLAGS_NORMAL, NULL);
     1545        vrc = VDOpen(pDisk, "VMDK", Utf8Str(src).c_str(), VD_OPEN_FLAGS_NORMAL, NULL);
    15481546        if (RT_FAILURE(vrc))
    15491547        {
     
    15521550        else
    15531551        {
    1554             vrc = VDCopy(pDisk, 0, pDisk, "VMDK", Utf8Str(dst).raw(), true, 0, VD_IMAGE_FLAGS_NONE, NULL, NULL, NULL, NULL);
     1552            vrc = VDCopy(pDisk, 0, pDisk, "VMDK", Utf8Str(dst).c_str(), true, 0, VD_IMAGE_FLAGS_NONE, NULL, NULL, NULL, NULL);
    15551553            if (RT_FAILURE(vrc))
    15561554            {
     
    15961594        else
    15971595        {
    1598             return errorSyntax(USAGE_CONVERTTORAW, "Invalid parameter '%s'", Utf8Str(argv[i]).raw());
     1596            return errorSyntax(USAGE_CONVERTTORAW, "Invalid parameter '%s'", Utf8Str(argv[i]).c_str());
    15991597        }
    16001598    }
     
    16321630        outFile = 1;
    16331631    else
    1634         vrc = RTFileOpen(&outFile, Utf8Str(dst).raw(), RTFILE_O_WRITE | RTFILE_O_CREATE | RTFILE_O_DENY_ALL);
     1632        vrc = RTFileOpen(&outFile, Utf8Str(dst).c_str(), RTFILE_O_WRITE | RTFILE_O_CREATE | RTFILE_O_DENY_ALL);
    16351633    if (RT_FAILURE(vrc))
    16361634    {
    16371635        VDCloseAll(pDisk);
    1638         RTPrintf("Error while creating destination file \"%s\": %Rrc\n", Utf8Str(dst).raw(), vrc);
     1636        RTPrintf("Error while creating destination file \"%s\": %Rrc\n", Utf8Str(dst).c_str(), vrc);
    16391637        return 1;
    16401638    }
     
    16431641    {
    16441642        char *pszFormat = NULL;
    1645         vrc = VDGetFormat(NULL, Utf8Str(src).raw(), &pszFormat);
     1643        vrc = VDGetFormat(NULL, Utf8Str(src).c_str(), &pszFormat);
    16461644        if (RT_FAILURE(vrc))
    16471645        {
     
    16501648            {
    16511649                RTFileClose(outFile);
    1652                 RTFileDelete(Utf8Str(dst).raw());
     1650                RTFileDelete(Utf8Str(dst).c_str());
    16531651            }
    16541652            RTPrintf("No file format specified and autodetect failed - please specify format: %Rrc\n", vrc);
     
    16581656        RTStrFree(pszFormat);
    16591657    }
    1660     vrc = VDOpen(pDisk, Utf8Str(srcformat).raw(), Utf8Str(src).raw(), VD_OPEN_FLAGS_READONLY, NULL);
     1658    vrc = VDOpen(pDisk, Utf8Str(srcformat).c_str(), Utf8Str(src).c_str(), VD_OPEN_FLAGS_READONLY, NULL);
    16611659    if (RT_FAILURE(vrc))
    16621660    {
     
    16651663        {
    16661664            RTFileClose(outFile);
    1667             RTFileDelete(Utf8Str(dst).raw());
     1665            RTFileDelete(Utf8Str(dst).c_str());
    16681666        }
    16691667        RTPrintf("Error while opening the source image: %Rrc\n", vrc);
     
    16781676    if (pvBuf)
    16791677    {
    1680         RTPrintf("Converting image \"%s\" with size %RU64 bytes (%RU64MB) to raw...\n", Utf8Str(src).raw(), cbSize, (cbSize + _1M - 1) / _1M);
     1678        RTPrintf("Converting image \"%s\" with size %RU64 bytes (%RU64MB) to raw...\n", Utf8Str(src).c_str(), cbSize, (cbSize + _1M - 1) / _1M);
    16811679        while (offFile < cbSize)
    16821680        {
     
    16961694            {
    16971695                RTFileClose(outFile);
    1698                 RTFileDelete(Utf8Str(dst).raw());
     1696                RTFileDelete(Utf8Str(dst).c_str());
    16991697            }
    17001698            RTPrintf("Error copying image data: %Rrc\n", vrc);
     
    17091707        {
    17101708            RTFileClose(outFile);
    1711             RTFileDelete(Utf8Str(dst).raw());
     1709            RTFileDelete(Utf8Str(dst).c_str());
    17121710        }
    17131711        RTPrintf("Error allocating read buffer: %Rrc\n", vrc);
     
    17621760        else
    17631761        {
    1764             return errorSyntax(USAGE_CONVERTHD, "Invalid parameter '%s'", Utf8Str(argv[i]).raw());
     1762            return errorSyntax(USAGE_CONVERTHD, "Invalid parameter '%s'", Utf8Str(argv[i]).c_str());
    17651763        }
    17661764    }
     
    17901788        {
    17911789            char *pszFormat = NULL;
    1792             vrc = VDGetFormat(NULL, Utf8Str(src).raw(), &pszFormat);
     1790            vrc = VDGetFormat(NULL, Utf8Str(src).c_str(), &pszFormat);
    17931791            if (RT_FAILURE(vrc))
    17941792            {
     
    18081806
    18091807        /* Open the input image */
    1810         vrc = VDOpen(pSrcDisk, Utf8Str(srcformat).raw(), Utf8Str(src).raw(), VD_OPEN_FLAGS_READONLY, NULL);
     1808        vrc = VDOpen(pSrcDisk, Utf8Str(srcformat).c_str(), Utf8Str(src).c_str(), VD_OPEN_FLAGS_READONLY, NULL);
    18111809        if (RT_FAILURE(vrc))
    18121810        {
     
    18271825
    18281826        uint64_t cbSize = VDGetSize(pSrcDisk, VD_LAST_IMAGE);
    1829         RTPrintf("Converting image \"%s\" with size %RU64 bytes (%RU64MB)...\n", Utf8Str(src).raw(), cbSize, (cbSize + _1M - 1) / _1M);
     1827        RTPrintf("Converting image \"%s\" with size %RU64 bytes (%RU64MB)...\n", Utf8Str(src).c_str(), cbSize, (cbSize + _1M - 1) / _1M);
    18301828
    18311829        /* Create the output image */
    1832         vrc = VDCopy(pSrcDisk, VD_LAST_IMAGE, pDstDisk, Utf8Str(dstformat).raw(),
    1833                      Utf8Str(dst).raw(), false, 0, VD_VMDK_IMAGE_FLAGS_STREAM_OPTIMIZED, NULL, NULL, NULL, NULL);
     1830        vrc = VDCopy(pSrcDisk, VD_LAST_IMAGE, pDstDisk, Utf8Str(dstformat).c_str(),
     1831                     Utf8Str(dst).c_str(), false, 0, VD_VMDK_IMAGE_FLAGS_STREAM_OPTIMIZED, NULL, NULL, NULL, NULL);
    18341832        if (RT_FAILURE(vrc))
    18351833        {
     
    20362034
    20372035    /* default: */
    2038     return errorSyntax(USAGE_ALL, "Invalid command '%s'", Utf8Str(a->argv[0]).raw());
    2039 }
    2040 
     2036    return errorSyntax(USAGE_ALL, "Invalid command '%s'", Utf8Str(a->argv[0]).c_str());
     2037}
     2038
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManage.cpp

    r31070 r31539  
    407407    }
    408408    if (!s_commandHandlers[commandIndex].command)
    409     {
    410         rc = errorSyntax(USAGE_ALL, "Invalid command '%s'", Utf8Str(argv[iCmd]).raw());
    411     }
     409        rc = errorSyntax(USAGE_ALL, "Invalid command '%s'", Utf8Str(argv[iCmd]).c_str());
    412410
    413411    /* Although all handlers should always close the session if they open it,
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageControlVM.cpp

    r31070 r31539  
    298298                else
    299299                {
    300                     errorArgument("Invalid link state '%s'", Utf8Str(a->argv[2]).raw());
     300                    errorArgument("Invalid link state '%s'", Utf8Str(a->argv[2]).c_str());
    301301                    rc = E_FAIL;
    302302                    break;
     
    397397                    else
    398398                    {
    399                         errorArgument("Invalid nictrace%lu argument '%s'", n, Utf8Str(a->argv[2]).raw());
     399                        errorArgument("Invalid nictrace%lu argument '%s'", n, Utf8Str(a->argv[2]).c_str());
    400400                        rc = E_FAIL;
    401401                        break;
     
    491491                    else
    492492                    {
    493                         errorArgument("Invalid type '%s' specfied for NIC %lu", Utf8Str(a->argv[2]).raw(), n);
     493                        errorArgument("Invalid type '%s' specfied for NIC %lu", Utf8Str(a->argv[2]).c_str(), n);
    494494                        rc = E_FAIL;
    495495                        break;
     
    528528                else
    529529                {
    530                     errorArgument("Invalid vrdp server state '%s'", Utf8Str(a->argv[2]).raw());
     530                    errorArgument("Invalid vrdp server state '%s'", Utf8Str(a->argv[2]).c_str());
    531531                    rc = E_FAIL;
    532532                    break;
     
    876876        else
    877877        {
    878             errorSyntax(USAGE_CONTROLVM, "Invalid parameter '%s'", Utf8Str(a->argv[1]).raw());
     878            errorSyntax(USAGE_CONTROLVM, "Invalid parameter '%s'", Utf8Str(a->argv[1]).c_str());
    879879            rc = E_FAIL;
    880880        }
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageDHCPServer.cpp

    r30322 r31539  
    308308        else
    309309        {
    310             result = errorSyntax(USAGE_DHCPSERVER, "Invalid parameter '%s'", Utf8Str(a->argv[i]).raw());
     310            result = errorSyntax(USAGE_DHCPSERVER, "Invalid parameter '%s'", Utf8Str(a->argv[i]).c_str());
    311311            break;
    312312        }
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageDisk.cpp

    r31152 r31539  
    312312                }
    313313
    314                 RTPrintf("Disk image created. UUID: %s\n", Utf8Str(uuid).raw());
     314                RTPrintf("Disk image created. UUID: %s\n", Utf8Str(uuid).c_str());
    315315            }
    316316        }
     
    628628            if (RT_FAILURE(irc))
    629629            {
    630                 RTPrintf("Cannot convert filename \"%s\" to absolute path\n", Utf8Str(src).raw());
     630                RTPrintf("Cannot convert filename \"%s\" to absolute path\n", Utf8Str(src).c_str());
    631631                return 1;
    632632            }
     
    662662                    if (RT_FAILURE(irc))
    663663                    {
    664                         RTPrintf("Cannot convert filename \"%s\" to absolute path\n", Utf8Str(dst).raw());
     664                        RTPrintf("Cannot convert filename \"%s\" to absolute path\n", Utf8Str(dst).c_str());
    665665                        return 1;
    666666                    }
     
    708708
    709709        RTPrintf("Clone hard disk created in format '%ls'. UUID: %s\n",
    710                  format.raw(), Utf8Str(uuid).raw());
     710                 format.raw(), Utf8Str(uuid).c_str());
    711711    }
    712712    while (0);
     
    10931093        Bstr guid;
    10941094        CHECK_ERROR(hardDisk, COMGETTER(Id)(guid.asOutParam()));
    1095         RTPrintf("iSCSI disk created. UUID: %s\n", Utf8Str(guid).raw());
     1095        RTPrintf("iSCSI disk created. UUID: %s\n", Utf8Str(guid).c_str());
    10961096    }
    10971097    while (0);
     
    11861186
    11871187        hardDisk->COMGETTER(Id)(uuid.asOutParam());
    1188         RTPrintf("UUID:                 %s\n", Utf8Str(uuid).raw());
     1188        RTPrintf("UUID:                 %s\n", Utf8Str(uuid).c_str());
    11891189
    11901190        /* check for accessibility */
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageGuestCtrl.cpp

    r31381 r31539  
    253253        }
    254254        else if (!strcmp(a->argv[i], "--verbose"))
    255         {
    256255            fVerbose = true;
    257         }
    258256        /** @todo Add fancy piping stuff here. */
    259257        else
    260         {
    261258            return errorSyntax(USAGE_GUESTCONTROL,
    262                                "Invalid parameter '%s'", Utf8Str(a->argv[i]).raw());
    263         }
     259                               "Invalid parameter '%s'", Utf8Str(a->argv[i]).c_str());
    264260    }
    265261
     
    333329            }
    334330            if (fVerbose)
    335                 RTPrintf("Process '%s' (PID: %u) started\n", Utf8Cmd.raw(), uPID);
     331                RTPrintf("Process '%s' (PID: %u) started\n", Utf8Cmd.c_str(), uPID);
    336332            if (fWaitForExit)
    337333            {
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageGuestProp.cpp

    r31070 r31539  
    197197    Utf8Str Utf8Patterns(a->argc > 2 ? a->argv[2] : "");
    198198    for (int i = 3; i < a->argc; ++i)
    199         Utf8Patterns = Utf8StrFmt ("%s,%s", Utf8Patterns.raw(), a->argv[i]);
     199        Utf8Patterns = Utf8StrFmt ("%s,%s", Utf8Patterns.c_str(), a->argv[i]);
    200200
    201201    /*
     
    335335                    gpcev->COMGETTER(Name)(aNextName.asOutParam());
    336336                    if (RTStrSimplePatternMultiMatch(pszPatterns, RTSTR_MAX,
    337                                                      Utf8Str(aNextName).raw(), RTSTR_MAX, NULL))
     337                                                     Utf8Str(aNextName).c_str(), RTSTR_MAX, NULL))
    338338                    {
    339339                        Bstr aNextValue, aNextFlags;
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageHostonly.cpp

    r30322 r31539  
    319319        else
    320320        {
    321             result = errorSyntax(USAGE_HOSTONLYIFS, "Invalid parameter '%s'", Utf8Str(a->argv[i]).raw());
     321            result = errorSyntax(USAGE_HOSTONLYIFS, "Invalid parameter '%s'", Utf8Str(a->argv[i]).c_str());
    322322            break;
    323323        }
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageInfo.cpp

    r31219 r31539  
    5959        /* print with hierarchical numbering */
    6060        RTPrintf("SnapshotName%lS=\"%lS\"\n", prefix.raw(), name.raw());
    61         RTPrintf("SnapshotUUID%lS=\"%s\"\n", prefix.raw(), Utf8Str(uuid).raw());
     61        RTPrintf("SnapshotUUID%lS=\"%s\"\n", prefix.raw(), Utf8Str(uuid).c_str());
    6262    }
    6363    else
     
    6868                 prefix.raw(),
    6969                 name.raw(),
    70                  Utf8Str(uuid).raw(),
     70                 Utf8Str(uuid).c_str(),
    7171                 (fCurrent) ? " *" : "");
    7272    }
     
    151151    {
    152152        if (details == VMINFO_COMPACT)
    153             RTPrintf("\"<inaccessible>\" {%s}\n", Utf8Str(uuid).raw());
     153            RTPrintf("\"<inaccessible>\" {%s}\n", Utf8Str(uuid).c_str());
    154154        else
    155155        {
     
    159159                RTPrintf("Name:            <inaccessible!>\n");
    160160            if (details == VMINFO_MACHINEREADABLE)
    161                 RTPrintf("UUID=\"%s\"\n", Utf8Str(uuid).raw());
    162             else
    163                 RTPrintf("UUID:            %s\n", Utf8Str(uuid).raw());
     161                RTPrintf("UUID=\"%s\"\n", Utf8Str(uuid).c_str());
     162            else
     163                RTPrintf("UUID:            %s\n", Utf8Str(uuid).c_str());
    164164            if (details != VMINFO_MACHINEREADABLE)
    165165            {
     
    183183    if (details == VMINFO_COMPACT)
    184184    {
    185         RTPrintf("\"%lS\" {%s}\n", machineName.raw(), Utf8Str(uuid).raw());
     185        RTPrintf("\"%lS\" {%s}\n", machineName.raw(), Utf8Str(uuid).c_str());
    186186        return S_OK;
    187187    }
     
    204204
    205205    if (details == VMINFO_MACHINEREADABLE)
    206         RTPrintf("UUID=\"%s\"\n", Utf8Str(uuid).raw());
    207     else
    208         RTPrintf("UUID:            %s\n", Utf8Str(uuid).raw());
     206        RTPrintf("UUID=\"%s\"\n", Utf8Str(uuid).c_str());
     207    else
     208        RTPrintf("UUID:            %s\n", Utf8Str(uuid).c_str());
    209209
    210210    Bstr settingsFilePath;
     
    694694                                 i, k, filePath.raw());
    695695                        RTPrintf("\"%lS-ImageUUID-%d-%d\"=\"%s\"\n",
    696                                  storageCtlName.raw(), i, k, Utf8Str(uuid).raw());
     696                                 storageCtlName.raw(), i, k, Utf8Str(uuid).c_str());
    697697                        if (fPassthrough)
    698698                            RTPrintf("\"%lS-dvdpassthrough\"=\"%s\"\n", storageCtlName.raw(),
     
    703703                        RTPrintf("%lS (%d, %d): %lS (UUID: %s)",
    704704                                 storageCtlName.raw(), i, k, filePath.raw(),
    705                                  Utf8Str(uuid).raw());
     705                                 Utf8Str(uuid).c_str());
    706706                        if (fPassthrough)
    707707                            RTPrintf(" (passthrough enabled)");
     
    790790                                if (pos == Utf8Str::npos)                       \
    791791                                {                                               \
    792                                     Log(( #res " extracting from %s is failed\n", str.raw())); \
     792                                    Log(( #res " extracting from %s is failed\n", str.c_str())); \
    793793                                    fSkip = true;                               \
    794794                                }                                               \
    795795                                res = str.substr(ppos, pos - ppos);             \
    796                                 Log2((#res " %s pos:%d, ppos:%d\n", res.raw(), pos, ppos)); \
     796                                Log2((#res " %s pos:%d, ppos:%d\n", res.c_str(), pos, ppos)); \
    797797                                ppos = pos + 1;                                 \
    798798                            } while (0)
     
    824824                            {
    825825                                strNatForwardings = Utf8StrFmt("%sForwarding(%d)=\"%s,%s,%s,%s,%s,%s\"\n",
    826                                     strNatForwardings.raw(), i, strName.raw(), strProto.raw(),
    827                                     strHostIP.isEmpty() ? "": strHostIP.raw(), strHostPort.raw(),
    828                                     strGuestIP.isEmpty() ? "": strGuestIP.raw(), strGuestPort.raw());
     826                                    strNatForwardings.c_str(), i, strName.c_str(), strProto.c_str(),
     827                                    strHostIP.c_str(), strHostPort.c_str(),
     828                                    strGuestIP.c_str(), strGuestPort.c_str());
    829829                            }
    830830                            else
     
    832832                                strNatForwardings = Utf8StrFmt("%sNIC %d Rule(%d):   name = %s, protocol = %s,"
    833833                                    " host ip = %s, host port = %s, guest ip = %s, guest port = %s\n",
    834                                     strNatForwardings.raw(), currentNIC + 1, i, strName.raw(), strProto.raw(),
    835                                     strHostIP.isEmpty() ? "": strHostIP.raw(), strHostPort.raw(),
    836                                     strGuestIP.isEmpty() ? "": strGuestIP.raw(), strGuestPort.raw());
     834                                    strNatForwardings.c_str(), currentNIC + 1, i, strName.c_str(), strProto.c_str(),
     835                                    strHostIP.c_str(), strHostPort.c_str(),
     836                                    strGuestIP.c_str(), strGuestPort.c_str());
    837837                            }
    838838                        }
     
    882882                        }
    883883                        else
    884                             strAttachment = Utf8StrFmt("Internal Network '%s'", Utf8Str(strNetwork).raw());
     884                            strAttachment = Utf8StrFmt("Internal Network '%s'", Utf8Str(strNetwork).c_str());
    885885                        break;
    886886                    }
     
    974974                    RTPrintf("macaddress%d=\"%lS\"\n", currentNIC + 1, strMACAddress.raw());
    975975                    RTPrintf("cableconnected%d=\"%s\"\n", currentNIC + 1, fConnected ? "on" : "off");
    976                     RTPrintf("nic%d=\"%s\"\n", currentNIC + 1, strAttachment.raw());
     976                    RTPrintf("nic%d=\"%s\"\n", currentNIC + 1, strAttachment.c_str());
    977977                }
    978978                else
    979979                    RTPrintf("NIC %d:           MAC: %lS, Attachment: %s, Cable connected: %s, Trace: %s (file: %lS), Type: %s, Reported speed: %d Mbps, Boot priority: %d\n",
    980                              currentNIC + 1, strMACAddress.raw(), strAttachment.raw(),
     980                             currentNIC + 1, strMACAddress.raw(), strAttachment.c_str(),
    981981                             fConnected ? "on" : "off",
    982982                             fTraceEnabled ? "on" : "off",
    983983                             traceFile.isEmpty() ? Bstr("none").raw() : traceFile.raw(),
    984                              strNICType.raw(),
     984                             strNICType.c_str(),
    985985                             ulLineSpeed / 1000,
    986986                             (int)ulBootPriority);
    987987                if (strNatSettings.length())
    988                     RTPrintf(strNatSettings.raw());
     988                    RTPrintf(strNatSettings.c_str());
    989989                if (strNatForwardings.length())
    990                     RTPrintf(strNatForwardings.raw());
     990                    RTPrintf(strNatForwardings.c_str());
    991991            }
    992992        }
     
    15371537                                     "USBRemoteProductId%zu=\"%#06x\"\n"
    15381538                                     "USBRemoteRevision%zu=\"%#04x%02x\"\n",
    1539                                      index + 1, Utf8Str(id).raw(),
     1539                                     index + 1, Utf8Str(id).c_str(),
    15401540                                     index + 1, usVendorId,
    15411541                                     index + 1, usProductId,
     
    15461546                                     "ProductId:          0x%04x (%04X)\n"
    15471547                                     "Revision:           %u.%u (%02u%02u)\n",
    1548                                      Utf8Str(id).raw(),
     1548                                     Utf8Str(id).c_str(),
    15491549                                     usVendorId, usVendorId, usProductId, usProductId,
    15501550                                     bcdRevision >> 8, bcdRevision & 0xff,
     
    16261626                                     "USBAttachedProductId%zu=\"%#06x\"\n"
    16271627                                     "USBAttachedRevision%zu=\"%#04x%02x\"\n",
    1628                                      index + 1, Utf8Str(id).raw(),
     1628                                     index + 1, Utf8Str(id).c_str(),
    16291629                                     index + 1, usVendorId,
    16301630                                     index + 1, usProductId,
     
    16351635                                     "ProductId:          0x%04x (%04X)\n"
    16361636                                     "Revision:           %u.%u (%02u%02u)\n",
    1637                                      Utf8Str(id).raw(),
     1637                                     Utf8Str(id).c_str(),
    16381638                                     usVendorId, usVendorId, usProductId, usProductId,
    16391639                                     bcdRevision >> 8, bcdRevision & 0xff,
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageList.cpp

    r29356 r31539  
    7373        Bstr uuid;
    7474        pMedium->COMGETTER(Id)(uuid.asOutParam());
    75         RTPrintf("UUID:        %s\n", Utf8Str(uuid).raw());
     75        RTPrintf("UUID:        %s\n", Utf8Str(uuid).c_str());
    7676        if (pszParentUUIDStr)
    7777            RTPrintf("Parent UUID: %s\n", pszParentUUIDStr);
     
    167167        {
    168168            // depth first listing of child media
    169             listMedia(aVirtualBox, children, Utf8Str(uuid).raw());
     169            listMedia(aVirtualBox, children, Utf8Str(uuid).c_str());
    170170        }
    171171    }
     
    391391                    Bstr uuid;
    392392                    dvdDrive->COMGETTER(Id)(uuid.asOutParam());
    393                     RTPrintf("UUID:         %s\n", Utf8Str(uuid).raw());
     393                    RTPrintf("UUID:         %s\n", Utf8Str(uuid).c_str());
    394394                    Bstr name;
    395395                    dvdDrive->COMGETTER(Name)(name.asOutParam());
     
    413413                    Bstr uuid;
    414414                    floppyDrive->COMGETTER(Id)(uuid.asOutParam());
    415                     RTPrintf("UUID:         %s\n", Utf8Str(uuid).raw());
     415                    RTPrintf("UUID:         %s\n", Utf8Str(uuid).c_str());
    416416                    Bstr name;
    417417                    floppyDrive->COMGETTER(Name)(name.asOutParam());
     
    706706                            "ProductId:          0x%04x (%04X)\n"
    707707                            "Revision:           %u.%u (%02u%02u)\n",
    708                             Utf8Str(id).raw(),
     708                            Utf8Str(id).c_str(),
    709709                            usVendorId, usVendorId, usProductId, usProductId,
    710710                            bcdRevision >> 8, bcdRevision & 0xff,
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageMisc.cpp

    r31333 r31539  
    238238        }
    239239        else
    240             return errorSyntax(USAGE_CREATEVM, "Invalid parameter '%s'", Utf8Str(a->argv[i]).raw());
     240            return errorSyntax(USAGE_CREATEVM, "Invalid parameter '%s'", Utf8Str(a->argv[i]).c_str());
    241241    }
    242242    if (!name)
     
    269269                 "Settings file: '%ls'\n",
    270270                 name.raw(), fRegister ? " and registered" : "",
    271                  Utf8Str(uuid).raw(), settingsFile.raw());
     271                 Utf8Str(uuid).c_str(), settingsFile.raw());
    272272    }
    273273    while (0);
     
    719719            }
    720720            else
    721                 return errorSyntax(USAGE_SHAREDFOLDER_ADD, "Invalid parameter '%s'", Utf8Str(a->argv[i]).raw());
     721                return errorSyntax(USAGE_SHAREDFOLDER_ADD, "Invalid parameter '%s'", Utf8Str(a->argv[i]).c_str());
    722722        }
    723723
     
    789789            }
    790790            else
    791                 return errorSyntax(USAGE_SHAREDFOLDER_REMOVE, "Invalid parameter '%s'", Utf8Str(a->argv[i]).raw());
     791                return errorSyntax(USAGE_SHAREDFOLDER_REMOVE, "Invalid parameter '%s'", Utf8Str(a->argv[i]).c_str());
    792792        }
    793793
     
    828828    }
    829829    else
    830         return errorSyntax(USAGE_SETPROPERTY, "Invalid parameter '%s'", Utf8Str(a->argv[0]).raw());
     830        return errorSyntax(USAGE_SETPROPERTY, "Invalid parameter '%s'", Utf8Str(a->argv[0]).c_str());
    831831
    832832    return 0;
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageModifyVM.cpp

    r31298 r31539  
    339339                else
    340340                {
    341                     errorArgument("Invalid guest OS type '%s'", Utf8Str(ValueUnion.psz).raw());
     341                    errorArgument("Invalid guest OS type '%s'", Utf8Str(ValueUnion.psz).c_str());
    342342                    rc = E_FAIL;
    343343                }
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageSnapshot.cpp

    r31070 r31539  
    456456                else
    457457                {
    458                     errorSyntax(USAGE_SNAPSHOT, "Invalid parameter '%s'", Utf8Str(a->argv[i]).raw());
     458                    errorSyntax(USAGE_SNAPSHOT, "Invalid parameter '%s'", Utf8Str(a->argv[i]).c_str());
    459459                    rc = E_FAIL;
    460460                    break;
     
    489489        }
    490490        else if (!strcmp(a->argv[1], "dump"))          // undocumented parameter to debug snapshot info
    491         {
    492491            DumpSnapshot(pMachine);
    493         }
    494492        else
    495493        {
    496             errorSyntax(USAGE_SNAPSHOT, "Invalid parameter '%s'", Utf8Str(a->argv[1]).raw());
     494            errorSyntax(USAGE_SNAPSHOT, "Invalid parameter '%s'", Utf8Str(a->argv[1]).c_str());
    497495            rc = E_FAIL;
    498496        }
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