Changeset 31539 in vbox for trunk/src/VBox/Frontends/VBoxManage
- Timestamp:
- Aug 10, 2010 3:40:18 PM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 64639
- Location:
- trunk/src/VBox/Frontends/VBoxManage
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/VBoxInternalManage.cpp
r31461 r31539 269 269 /* find a unique number - brute force rulez. */ 270 270 Utf8Str KeysUtf8(Keys); 271 const char *pszKeys = RTStrStripL(KeysUtf8. raw());271 const char *pszKeys = RTStrStripL(KeysUtf8.c_str()); 272 272 for (unsigned i = 1; i < 1000000; i++) 273 273 { … … 526 526 HDPARENTUUID 527 527 } uuidType; 528 528 529 529 if (!strcmp(argv[0], "sethduuid")) 530 530 { … … 598 598 RTPrintf("Error while setting a new UUID: %Rrc\n", rc); 599 599 else 600 RTPrintf("UUID changed to: %s\n", uuid.toString(). raw());600 RTPrintf("UUID changed to: %s\n", uuid.toString().c_str()); 601 601 602 602 VDCloseAll(pDisk); … … 848 848 else 849 849 { 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()); 851 851 } 852 852 } … … 856 856 857 857 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); 859 859 if (RT_FAILURE(vrc)) 860 860 { … … 972 972 #endif /* RT_OS_LINUX */ 973 973 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()); 977 975 } 978 976 … … 988 986 #endif /* RT_OS_DARWIN */ 989 987 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); 991 989 if (RT_FAILURE(vrc)) 992 990 { 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); 994 992 goto out; 995 993 } … … 1066 1064 { 1067 1065 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); 1069 1067 goto out; 1070 1068 } … … 1073 1071 else 1074 1072 { 1075 RTPrintf("File '%s' is no block device\n", rawdisk. raw());1073 RTPrintf("File '%s' is no block device\n", rawdisk.c_str()); 1076 1074 vrc = VERR_INVALID_PARAMETER; 1077 1075 goto out; … … 1164 1162 if (!cbSize || cbSize % 512) 1165 1163 { 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); 1167 1165 vrc = VERR_INVALID_PARAMETER; 1168 1166 goto out; … … 1176 1174 { 1177 1175 RawDescriptor.fRawDisk = true; 1178 RawDescriptor.pszRawDisk = rawdisk. raw();1176 RawDescriptor.pszRawDisk = rawdisk.c_str(); 1179 1177 } 1180 1178 else … … 1214 1212 if (RT_FAILURE(vrc)) 1215 1213 { 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()); 1217 1215 goto out; 1218 1216 } … … 1245 1243 if (!pPartDesc) 1246 1244 { 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()); 1248 1246 vrc = VERR_NO_MEMORY; 1249 1247 goto out; … … 1261 1259 if (!pPartData) 1262 1260 { 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()); 1264 1262 vrc = VERR_NO_MEMORY; 1265 1263 goto out; … … 1269 1267 if (RT_FAILURE(vrc)) 1270 1268 { 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); 1272 1270 goto out; 1273 1271 } … … 1303 1301 1304 1302 /* set up values for non-relative device names */ 1305 const char *pszRawName = rawdisk. raw();1303 const char *pszRawName = rawdisk.c_str(); 1306 1304 uint64_t uStartOffset = partitions.aPartitions[i].uStart * 512; 1307 1305 … … 1310 1308 if (!pPartDesc) 1311 1309 { 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()); 1313 1311 vrc = VERR_NO_MEMORY; 1314 1312 goto out; … … 1322 1320 /* Refer to the correct partition and use offset 0. */ 1323 1321 char *psz; 1324 vrc = RTStrAPrintf(&psz, "%s%u", rawdisk. raw(),1322 vrc = RTStrAPrintf(&psz, "%s%u", rawdisk.c_str(), 1325 1323 partitions.aPartitions[i].uIndex); 1326 1324 if (RT_FAILURE(vrc)) … … 1446 1444 LCHS.cHeads = 0; 1447 1445 LCHS.cSectors = 0; 1448 vrc = VDCreateBase(pDisk, "VMDK", Utf8Str(filename). raw(), cbSize,1446 vrc = VDCreateBase(pDisk, "VMDK", Utf8Str(filename).c_str(), cbSize, 1449 1447 VD_IMAGE_FLAGS_FIXED | VD_VMDK_IMAGE_FLAGS_RAWDISK, 1450 1448 (char *)&RawDescriptor, &PCHS, &LCHS, NULL, … … 1455 1453 goto out; 1456 1454 } 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()); 1458 1456 1459 1457 VDCloseAll(pDisk); … … 1514 1512 else 1515 1513 { 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()); 1517 1515 } 1518 1516 } … … 1545 1543 else 1546 1544 { 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); 1548 1546 if (RT_FAILURE(vrc)) 1549 1547 { … … 1552 1550 else 1553 1551 { 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); 1555 1553 if (RT_FAILURE(vrc)) 1556 1554 { … … 1596 1594 else 1597 1595 { 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()); 1599 1597 } 1600 1598 } … … 1632 1630 outFile = 1; 1633 1631 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); 1635 1633 if (RT_FAILURE(vrc)) 1636 1634 { 1637 1635 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); 1639 1637 return 1; 1640 1638 } … … 1643 1641 { 1644 1642 char *pszFormat = NULL; 1645 vrc = VDGetFormat(NULL, Utf8Str(src). raw(), &pszFormat);1643 vrc = VDGetFormat(NULL, Utf8Str(src).c_str(), &pszFormat); 1646 1644 if (RT_FAILURE(vrc)) 1647 1645 { … … 1650 1648 { 1651 1649 RTFileClose(outFile); 1652 RTFileDelete(Utf8Str(dst). raw());1650 RTFileDelete(Utf8Str(dst).c_str()); 1653 1651 } 1654 1652 RTPrintf("No file format specified and autodetect failed - please specify format: %Rrc\n", vrc); … … 1658 1656 RTStrFree(pszFormat); 1659 1657 } 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); 1661 1659 if (RT_FAILURE(vrc)) 1662 1660 { … … 1665 1663 { 1666 1664 RTFileClose(outFile); 1667 RTFileDelete(Utf8Str(dst). raw());1665 RTFileDelete(Utf8Str(dst).c_str()); 1668 1666 } 1669 1667 RTPrintf("Error while opening the source image: %Rrc\n", vrc); … … 1678 1676 if (pvBuf) 1679 1677 { 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); 1681 1679 while (offFile < cbSize) 1682 1680 { … … 1696 1694 { 1697 1695 RTFileClose(outFile); 1698 RTFileDelete(Utf8Str(dst). raw());1696 RTFileDelete(Utf8Str(dst).c_str()); 1699 1697 } 1700 1698 RTPrintf("Error copying image data: %Rrc\n", vrc); … … 1709 1707 { 1710 1708 RTFileClose(outFile); 1711 RTFileDelete(Utf8Str(dst). raw());1709 RTFileDelete(Utf8Str(dst).c_str()); 1712 1710 } 1713 1711 RTPrintf("Error allocating read buffer: %Rrc\n", vrc); … … 1762 1760 else 1763 1761 { 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()); 1765 1763 } 1766 1764 } … … 1790 1788 { 1791 1789 char *pszFormat = NULL; 1792 vrc = VDGetFormat(NULL, Utf8Str(src). raw(), &pszFormat);1790 vrc = VDGetFormat(NULL, Utf8Str(src).c_str(), &pszFormat); 1793 1791 if (RT_FAILURE(vrc)) 1794 1792 { … … 1808 1806 1809 1807 /* 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); 1811 1809 if (RT_FAILURE(vrc)) 1812 1810 { … … 1827 1825 1828 1826 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); 1830 1828 1831 1829 /* 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); 1834 1832 if (RT_FAILURE(vrc)) 1835 1833 { … … 2036 2034 2037 2035 /* 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 407 407 } 408 408 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()); 412 410 413 411 /* Although all handlers should always close the session if they open it, -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageControlVM.cpp
r31070 r31539 298 298 else 299 299 { 300 errorArgument("Invalid link state '%s'", Utf8Str(a->argv[2]). raw());300 errorArgument("Invalid link state '%s'", Utf8Str(a->argv[2]).c_str()); 301 301 rc = E_FAIL; 302 302 break; … … 397 397 else 398 398 { 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()); 400 400 rc = E_FAIL; 401 401 break; … … 491 491 else 492 492 { 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); 494 494 rc = E_FAIL; 495 495 break; … … 528 528 else 529 529 { 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()); 531 531 rc = E_FAIL; 532 532 break; … … 876 876 else 877 877 { 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()); 879 879 rc = E_FAIL; 880 880 } -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageDHCPServer.cpp
r30322 r31539 308 308 else 309 309 { 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()); 311 311 break; 312 312 } -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageDisk.cpp
r31152 r31539 312 312 } 313 313 314 RTPrintf("Disk image created. UUID: %s\n", Utf8Str(uuid). raw());314 RTPrintf("Disk image created. UUID: %s\n", Utf8Str(uuid).c_str()); 315 315 } 316 316 } … … 628 628 if (RT_FAILURE(irc)) 629 629 { 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()); 631 631 return 1; 632 632 } … … 662 662 if (RT_FAILURE(irc)) 663 663 { 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()); 665 665 return 1; 666 666 } … … 708 708 709 709 RTPrintf("Clone hard disk created in format '%ls'. UUID: %s\n", 710 format.raw(), Utf8Str(uuid). raw());710 format.raw(), Utf8Str(uuid).c_str()); 711 711 } 712 712 while (0); … … 1093 1093 Bstr guid; 1094 1094 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()); 1096 1096 } 1097 1097 while (0); … … 1186 1186 1187 1187 hardDisk->COMGETTER(Id)(uuid.asOutParam()); 1188 RTPrintf("UUID: %s\n", Utf8Str(uuid). raw());1188 RTPrintf("UUID: %s\n", Utf8Str(uuid).c_str()); 1189 1189 1190 1190 /* check for accessibility */ -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageGuestCtrl.cpp
r31381 r31539 253 253 } 254 254 else if (!strcmp(a->argv[i], "--verbose")) 255 {256 255 fVerbose = true; 257 }258 256 /** @todo Add fancy piping stuff here. */ 259 257 else 260 {261 258 return errorSyntax(USAGE_GUESTCONTROL, 262 "Invalid parameter '%s'", Utf8Str(a->argv[i]).raw()); 263 } 259 "Invalid parameter '%s'", Utf8Str(a->argv[i]).c_str()); 264 260 } 265 261 … … 333 329 } 334 330 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); 336 332 if (fWaitForExit) 337 333 { -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageGuestProp.cpp
r31070 r31539 197 197 Utf8Str Utf8Patterns(a->argc > 2 ? a->argv[2] : ""); 198 198 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]); 200 200 201 201 /* … … 335 335 gpcev->COMGETTER(Name)(aNextName.asOutParam()); 336 336 if (RTStrSimplePatternMultiMatch(pszPatterns, RTSTR_MAX, 337 Utf8Str(aNextName). raw(), RTSTR_MAX, NULL))337 Utf8Str(aNextName).c_str(), RTSTR_MAX, NULL)) 338 338 { 339 339 Bstr aNextValue, aNextFlags; -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageHostonly.cpp
r30322 r31539 319 319 else 320 320 { 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()); 322 322 break; 323 323 } -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageInfo.cpp
r31219 r31539 59 59 /* print with hierarchical numbering */ 60 60 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()); 62 62 } 63 63 else … … 68 68 prefix.raw(), 69 69 name.raw(), 70 Utf8Str(uuid). raw(),70 Utf8Str(uuid).c_str(), 71 71 (fCurrent) ? " *" : ""); 72 72 } … … 151 151 { 152 152 if (details == VMINFO_COMPACT) 153 RTPrintf("\"<inaccessible>\" {%s}\n", Utf8Str(uuid). raw());153 RTPrintf("\"<inaccessible>\" {%s}\n", Utf8Str(uuid).c_str()); 154 154 else 155 155 { … … 159 159 RTPrintf("Name: <inaccessible!>\n"); 160 160 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()); 164 164 if (details != VMINFO_MACHINEREADABLE) 165 165 { … … 183 183 if (details == VMINFO_COMPACT) 184 184 { 185 RTPrintf("\"%lS\" {%s}\n", machineName.raw(), Utf8Str(uuid). raw());185 RTPrintf("\"%lS\" {%s}\n", machineName.raw(), Utf8Str(uuid).c_str()); 186 186 return S_OK; 187 187 } … … 204 204 205 205 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()); 209 209 210 210 Bstr settingsFilePath; … … 694 694 i, k, filePath.raw()); 695 695 RTPrintf("\"%lS-ImageUUID-%d-%d\"=\"%s\"\n", 696 storageCtlName.raw(), i, k, Utf8Str(uuid). raw());696 storageCtlName.raw(), i, k, Utf8Str(uuid).c_str()); 697 697 if (fPassthrough) 698 698 RTPrintf("\"%lS-dvdpassthrough\"=\"%s\"\n", storageCtlName.raw(), … … 703 703 RTPrintf("%lS (%d, %d): %lS (UUID: %s)", 704 704 storageCtlName.raw(), i, k, filePath.raw(), 705 Utf8Str(uuid). raw());705 Utf8Str(uuid).c_str()); 706 706 if (fPassthrough) 707 707 RTPrintf(" (passthrough enabled)"); … … 790 790 if (pos == Utf8Str::npos) \ 791 791 { \ 792 Log(( #res " extracting from %s is failed\n", str. raw())); \792 Log(( #res " extracting from %s is failed\n", str.c_str())); \ 793 793 fSkip = true; \ 794 794 } \ 795 795 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)); \ 797 797 ppos = pos + 1; \ 798 798 } while (0) … … 824 824 { 825 825 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()); 829 829 } 830 830 else … … 832 832 strNatForwardings = Utf8StrFmt("%sNIC %d Rule(%d): name = %s, protocol = %s," 833 833 " 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()); 837 837 } 838 838 } … … 882 882 } 883 883 else 884 strAttachment = Utf8StrFmt("Internal Network '%s'", Utf8Str(strNetwork). raw());884 strAttachment = Utf8StrFmt("Internal Network '%s'", Utf8Str(strNetwork).c_str()); 885 885 break; 886 886 } … … 974 974 RTPrintf("macaddress%d=\"%lS\"\n", currentNIC + 1, strMACAddress.raw()); 975 975 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()); 977 977 } 978 978 else 979 979 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(), 981 981 fConnected ? "on" : "off", 982 982 fTraceEnabled ? "on" : "off", 983 983 traceFile.isEmpty() ? Bstr("none").raw() : traceFile.raw(), 984 strNICType. raw(),984 strNICType.c_str(), 985 985 ulLineSpeed / 1000, 986 986 (int)ulBootPriority); 987 987 if (strNatSettings.length()) 988 RTPrintf(strNatSettings. raw());988 RTPrintf(strNatSettings.c_str()); 989 989 if (strNatForwardings.length()) 990 RTPrintf(strNatForwardings. raw());990 RTPrintf(strNatForwardings.c_str()); 991 991 } 992 992 } … … 1537 1537 "USBRemoteProductId%zu=\"%#06x\"\n" 1538 1538 "USBRemoteRevision%zu=\"%#04x%02x\"\n", 1539 index + 1, Utf8Str(id). raw(),1539 index + 1, Utf8Str(id).c_str(), 1540 1540 index + 1, usVendorId, 1541 1541 index + 1, usProductId, … … 1546 1546 "ProductId: 0x%04x (%04X)\n" 1547 1547 "Revision: %u.%u (%02u%02u)\n", 1548 Utf8Str(id). raw(),1548 Utf8Str(id).c_str(), 1549 1549 usVendorId, usVendorId, usProductId, usProductId, 1550 1550 bcdRevision >> 8, bcdRevision & 0xff, … … 1626 1626 "USBAttachedProductId%zu=\"%#06x\"\n" 1627 1627 "USBAttachedRevision%zu=\"%#04x%02x\"\n", 1628 index + 1, Utf8Str(id). raw(),1628 index + 1, Utf8Str(id).c_str(), 1629 1629 index + 1, usVendorId, 1630 1630 index + 1, usProductId, … … 1635 1635 "ProductId: 0x%04x (%04X)\n" 1636 1636 "Revision: %u.%u (%02u%02u)\n", 1637 Utf8Str(id). raw(),1637 Utf8Str(id).c_str(), 1638 1638 usVendorId, usVendorId, usProductId, usProductId, 1639 1639 bcdRevision >> 8, bcdRevision & 0xff, -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageList.cpp
r29356 r31539 73 73 Bstr uuid; 74 74 pMedium->COMGETTER(Id)(uuid.asOutParam()); 75 RTPrintf("UUID: %s\n", Utf8Str(uuid). raw());75 RTPrintf("UUID: %s\n", Utf8Str(uuid).c_str()); 76 76 if (pszParentUUIDStr) 77 77 RTPrintf("Parent UUID: %s\n", pszParentUUIDStr); … … 167 167 { 168 168 // depth first listing of child media 169 listMedia(aVirtualBox, children, Utf8Str(uuid). raw());169 listMedia(aVirtualBox, children, Utf8Str(uuid).c_str()); 170 170 } 171 171 } … … 391 391 Bstr uuid; 392 392 dvdDrive->COMGETTER(Id)(uuid.asOutParam()); 393 RTPrintf("UUID: %s\n", Utf8Str(uuid). raw());393 RTPrintf("UUID: %s\n", Utf8Str(uuid).c_str()); 394 394 Bstr name; 395 395 dvdDrive->COMGETTER(Name)(name.asOutParam()); … … 413 413 Bstr uuid; 414 414 floppyDrive->COMGETTER(Id)(uuid.asOutParam()); 415 RTPrintf("UUID: %s\n", Utf8Str(uuid). raw());415 RTPrintf("UUID: %s\n", Utf8Str(uuid).c_str()); 416 416 Bstr name; 417 417 floppyDrive->COMGETTER(Name)(name.asOutParam()); … … 706 706 "ProductId: 0x%04x (%04X)\n" 707 707 "Revision: %u.%u (%02u%02u)\n", 708 Utf8Str(id). raw(),708 Utf8Str(id).c_str(), 709 709 usVendorId, usVendorId, usProductId, usProductId, 710 710 bcdRevision >> 8, bcdRevision & 0xff, -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageMisc.cpp
r31333 r31539 238 238 } 239 239 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()); 241 241 } 242 242 if (!name) … … 269 269 "Settings file: '%ls'\n", 270 270 name.raw(), fRegister ? " and registered" : "", 271 Utf8Str(uuid). raw(), settingsFile.raw());271 Utf8Str(uuid).c_str(), settingsFile.raw()); 272 272 } 273 273 while (0); … … 719 719 } 720 720 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()); 722 722 } 723 723 … … 789 789 } 790 790 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()); 792 792 } 793 793 … … 828 828 } 829 829 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()); 831 831 832 832 return 0; -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageModifyVM.cpp
r31298 r31539 339 339 else 340 340 { 341 errorArgument("Invalid guest OS type '%s'", Utf8Str(ValueUnion.psz). raw());341 errorArgument("Invalid guest OS type '%s'", Utf8Str(ValueUnion.psz).c_str()); 342 342 rc = E_FAIL; 343 343 } -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageSnapshot.cpp
r31070 r31539 456 456 else 457 457 { 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()); 459 459 rc = E_FAIL; 460 460 break; … … 489 489 } 490 490 else if (!strcmp(a->argv[1], "dump")) // undocumented parameter to debug snapshot info 491 {492 491 DumpSnapshot(pMachine); 493 }494 492 else 495 493 { 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()); 497 495 rc = E_FAIL; 498 496 }
Note:
See TracChangeset
for help on using the changeset viewer.