Changeset 97655 in vbox for trunk/src/VBox/Main
- Timestamp:
- Nov 22, 2022 2:18:28 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-client/GuestSessionImplTasks.cpp
r97626 r97655 355 355 LogFlowFunc(("strPath=%s, fMode=%RU32, fCreate=0x%x, fCanExist=%RTbool\n", strPath.c_str(), fMode, fCreate, fCanExist)); 356 356 357 LogRel2(("Guest Control: Creating host directory '%s'...\n", strPath.c_str()));357 LogRel2(("Guest Control: Creating host directory \"%s\" ...\n", strPath.c_str())); 358 358 359 359 int vrc = RTDirCreate(strPath.c_str(), fMode, fCreate); … … 609 609 if (fFileCopyFlags & FileCopyFlag_NoReplace) 610 610 { 611 LogRel2(("Guest Control: Host file \"%s\" already exists, skipping ", strDst.c_str()));611 LogRel2(("Guest Control: Host file \"%s\" already exists, skipping\n", strDst.c_str())); 612 612 vrc = VWRN_ALREADY_EXISTS; 613 613 fSkip = true; … … 621 621 if (RTTimeSpecCompare(&srcModificationTimeTS, &dstObjInfo.ModificationTime) <= 0) 622 622 { 623 LogRel2(("Guest Control: Host file \"%s\" has same or newer modification date, skipping ", strDst.c_str()));623 LogRel2(("Guest Control: Host file \"%s\" has same or newer modification date, skipping\n", strDst.c_str())); 624 624 vrc = VWRN_ALREADY_EXISTS; 625 625 fSkip = true; … … 681 681 || vrc == VERR_FILE_NOT_FOUND) 682 682 { 683 LogRel2(("Guest Control: Copying file '%s' from guest to '%s'on host ...\n", strSrc.c_str(), strDst.c_str()));683 LogRel2(("Guest Control: Copying file \"%s\" from guest to \"%s\" on host ...\n", strSrc.c_str(), strDst.c_str())); 684 684 685 685 RTFILE hDstFile; … … 688 688 if (RT_SUCCESS(vrc)) 689 689 { 690 LogFlowThisFunc(("Copying '%s' to '%s'(%RI64 bytes) ...\n",690 LogFlowThisFunc(("Copying \"%s\" to \"%s\" (%RI64 bytes) ...\n", 691 691 strSrc.c_str(), strDst.c_str(), srcObjData.mObjectSize)); 692 692 … … 758 758 { 759 759 setProgressErrorMsg(VBOX_E_IPRT_ERROR, 760 Utf8StrFmt(tr("Reading %RU32 bytes @ %RU64 from host file \"%s\" failed: %Rrc" , "", cbChunk),760 Utf8StrFmt(tr("Reading %RU32 bytes @ %RU64 from host file \"%s\" failed: %Rrc"), 761 761 cbChunk, cbWrittenTotal, strSrcFile.c_str(), vrc)); 762 762 break; … … 767 767 { 768 768 setProgressErrorMsg(VBOX_E_IPRT_ERROR, 769 Utf8StrFmt(tr("Writing %zu bytes to guest file \"%s\" failed: %Rrc" , "", cbRead),769 Utf8StrFmt(tr("Writing %zu bytes to guest file \"%s\" failed: %Rrc"), 770 770 cbRead, strDstFile.c_str(), vrc)); 771 771 break; … … 849 849 { 850 850 if (vrc == VERR_GSTCTL_GUEST_ERROR) 851 setProgressErrorMsg(VBOX_E_IPRT_ERROR, tr("Guest file could not be created or replaced"), 851 setProgressErrorMsg(VBOX_E_IPRT_ERROR, 852 Utf8StrFmt(tr("Guest file \"%s\" could not be created or replaced"), strDst.c_str()), 852 853 GuestErrorInfo(GuestErrorInfo::Type_File, vrcGuest, strDst.c_str())); 853 854 else … … 889 890 if (fFileCopyFlags & FileCopyFlag_NoReplace) 890 891 { 891 LogRel2(("Guest Control: Guest file \"%s\" already exists, skipping ", strDst.c_str()));892 LogRel2(("Guest Control: Guest file \"%s\" already exists, skipping\n", strDst.c_str())); 892 893 vrc = VWRN_ALREADY_EXISTS; 893 894 fSkip = true; … … 901 902 if (RTTimeSpecCompare(&dstModificationTimeTS, &srcObjInfo.ModificationTime) <= 0) 902 903 { 903 LogRel2(("Guest Control: Guest file \"%s\" has same or newer modification date, skipping ",904 LogRel2(("Guest Control: Guest file \"%s\" has same or newer modification date, skipping\n", 904 905 strDst.c_str())); 905 906 vrc = VWRN_ALREADY_EXISTS; … … 952 953 if (RT_SUCCESS(vrc)) 953 954 { 954 LogRel2(("Guest Control: Copying file '%s' from host to '%s'on guest ...\n", strSrc.c_str(), strDst.c_str()));955 LogRel2(("Guest Control: Copying file \"%s\" from host to \"%s\" on guest ...\n", strSrc.c_str(), strDst.c_str())); 955 956 956 957 RTVFSFILE hSrcFile; … … 958 959 if (RT_SUCCESS(vrc)) 959 960 { 960 LogFlowThisFunc(("Copying '%s' to '%s'(%RI64 bytes) ...\n",961 LogFlowThisFunc(("Copying \"%s\" to \"%s\" (%RI64 bytes) ...\n", 961 962 szSrcReal, strDst.c_str(), srcObjInfo.cbObject)); 962 963 … … 990 991 int FsList::AddEntryFromGuest(const Utf8Str &strFile, const GuestFsObjData &fsObjData) 991 992 { 992 LogFlowFunc(("Adding '%s'\n", strFile.c_str()));993 LogFlowFunc(("Adding \"%s\"\n", strFile.c_str())); 993 994 994 995 FsEntry *pEntry = NULL; … … 1020 1021 int FsList::AddEntryFromHost(const Utf8Str &strFile, PCRTFSOBJINFO pcObjInfo) 1021 1022 { 1022 LogFlowFunc(("Adding '%s'\n", strFile.c_str()));1023 LogFlowFunc(("Adding \"%s\"\n", strFile.c_str())); 1023 1024 1024 1025 FsEntry *pEntry = NULL; … … 1137 1138 strPathAbs += strPathSub; 1138 1139 1139 LogFlowFunc(("Entering '%s' (sub '%s')\n", strPathAbs.c_str(), strPathSub.c_str()));1140 1141 LogRel2(("Guest Control: Handling directory '%s'on guest ...\n", strPathAbs.c_str()));1140 LogFlowFunc(("Entering \"%s\" (sub \"%s\")\n", strPathAbs.c_str(), strPathSub.c_str())); 1141 1142 LogRel2(("Guest Control: Handling directory \"%s\" on guest ...\n", strPathAbs.c_str())); 1142 1143 1143 1144 GuestDirectoryOpenInfo dirOpenInfo; … … 1191 1192 Utf8Str strEntry = strPathSub + Utf8Str(bstrName); 1192 1193 1193 LogFlowFunc(("Entry '%s'\n", strEntry.c_str()));1194 LogFlowFunc(("Entry \"%s\"\n", strEntry.c_str())); 1194 1195 1195 1196 switch (enmObjType) … … 1203 1204 } 1204 1205 1205 LogRel2(("Guest Control: Directory '%s'\n", strEntry.c_str()));1206 LogRel2(("Guest Control: Directory \"%s\"\n", strEntry.c_str())); 1206 1207 1207 1208 if (!(mSourceSpec.fDirCopyFlags & DirectoryCopyFlag_Recursive)) … … 1219 1220 /** @todo Symlink handling from guest is not implemented yet. 1220 1221 * See IGuestSession::symlinkRead(). */ 1221 LogRel2(("Guest Control: Warning: Symlink support on guest side not available, skipping '%s'",1222 LogRel2(("Guest Control: Warning: Symlink support on guest side not available, skipping \"%s\"\n", 1222 1223 strEntry.c_str())); 1223 1224 } … … 1227 1228 case FsObjType_File: 1228 1229 { 1229 LogRel2(("Guest Control: File '%s'\n", strEntry.c_str()));1230 LogRel2(("Guest Control: File \"%s\"\n", strEntry.c_str())); 1230 1231 1231 1232 vrc = AddEntryFromGuest(strEntry, fsObjInfo->i_getData()); … … 1276 1277 strPathAbs += strPathSub; 1277 1278 1278 LogFlowFunc(("Entering '%s' (sub '%s')\n", strPathAbs.c_str(), strPathSub.c_str()));1279 1280 LogRel2(("Guest Control: Handling directory '%s'on host ...\n", strPathAbs.c_str()));1279 LogFlowFunc(("Entering \"%s\" (sub \"%s\")\n", strPathAbs.c_str(), strPathSub.c_str())); 1280 1281 LogRel2(("Guest Control: Handling directory \"%s\" on host ...\n", strPathAbs.c_str())); 1281 1282 1282 1283 RTFSOBJINFO objInfo; … … 1308 1309 Utf8Str strEntry = strPathSub + Utf8Str(pDirEntry->szName); 1309 1310 1310 LogFlowFunc(("Entry '%s'\n", strEntry.c_str()));1311 LogFlowFunc(("Entry \"%s\"\n", strEntry.c_str())); 1311 1312 1312 1313 switch (pDirEntry->Info.Attr.fMode & RTFS_TYPE_MASK) … … 1318 1319 break; 1319 1320 1320 LogRel2(("Guest Control: Directory '%s'\n", strEntry.c_str()));1321 LogRel2(("Guest Control: Directory \"%s\"\n", strEntry.c_str())); 1321 1322 1322 1323 if (!(mSourceSpec.fDirCopyFlags & DirectoryCopyFlag_Recursive)) … … 1329 1330 case RTFS_TYPE_FILE: 1330 1331 { 1331 LogRel2(("Guest Control: File '%s'\n", strEntry.c_str()));1332 LogRel2(("Guest Control: File \"%s\"\n", strEntry.c_str())); 1332 1333 1333 1334 vrc = AddEntryFromHost(strEntry, &pDirEntry->Info); … … 1347 1348 if (RTFS_IS_DIRECTORY(objInfo.Attr.fMode)) 1348 1349 { 1349 LogRel2(("Guest Control: Symbolic link '%s' -> '%s'(directory)\n",1350 LogRel2(("Guest Control: Symbolic link \"%s\" -> \"%s\" (directory)\n", 1350 1351 strEntryAbs.c_str(), pszPathReal)); 1351 1352 if (mSourceSpec.fDirCopyFlags & DirectoryCopyFlag_FollowLinks) … … 1354 1355 else if (RTFS_IS_FILE(objInfo.Attr.fMode)) 1355 1356 { 1356 LogRel2(("Guest Control: Symbolic link '%s' -> '%s'(file)\n",1357 LogRel2(("Guest Control: Symbolic link \"%s\" -> \"%s\" (file)\n", 1357 1358 strEntryAbs.c_str(), pszPathReal)); 1358 1359 if (mSourceSpec.fFileCopyFlags & FileCopyFlag_FollowLinks) … … 1364 1365 1365 1366 if (RT_FAILURE(vrc)) 1366 LogRel2(("Guest Control: Unable to query symbolic link info for '%s', rc=%Rrc\n",1367 LogRel2(("Guest Control: Unable to query symbolic link info for \"%s\", rc=%Rrc\n", 1367 1368 pszPathReal, vrc)); 1368 1369 } 1369 1370 else 1370 1371 { 1371 LogRel2(("Guest Control: Unable to resolve symlink for '%s', rc=%Rrc\n", strPathAbs.c_str(), vrc));1372 LogRel2(("Guest Control: Unable to resolve symlink for \"%s\", rc=%Rrc\n", strPathAbs.c_str(), vrc)); 1372 1373 if (vrc == VERR_FILE_NOT_FOUND) /* Broken symlink, skip. */ 1373 1374 vrc = VINF_SUCCESS; … … 1394 1395 } 1395 1396 else 1396 LogFlowFunc(("Unable to query '%s', rc=%Rrc\n", strPathAbs.c_str(), vrc));1397 LogFlowFunc(("Unable to query \"%s\", rc=%Rrc\n", strPathAbs.c_str(), vrc)); 1397 1398 1398 1399 LogFlowFuncLeaveRC(vrc); … … 1593 1594 { 1594 1595 delete pFsList; 1595 strErrorInfo.printf(tr("Error adding guest source '%s'to list: %Rrc"),1596 strErrorInfo.printf(tr("Error adding guest source \"%s\" to list: %Rrc"), 1596 1597 strSrc.c_str(), vrc); 1597 1598 break; … … 1717 1718 if (RT_SUCCESS(vrc)) 1718 1719 { 1719 LogRel2(("Guest Control: Host destination is a symbolic link '%s' -> '%s'(%s)\n",1720 LogRel2(("Guest Control: Host destination is a symbolic link \"%s\" -> \"%s\" (%s)\n", 1720 1721 strDstRootAbs.c_str(), szPathReal, 1721 1722 GuestBase::fsObjTypeToStr(GuestBase::fileModeToFsObjType(dstFsObjInfo.Attr.fMode)))); … … 2066 2067 if (RT_SUCCESS(vrc)) 2067 2068 { 2068 LogRel2(("Guest Control: Host source is a symbolic link '%s' -> '%s'(%s)\n",2069 LogRel2(("Guest Control: Host source is a symbolic link \"%s\" -> \"%s\" (%s)\n", 2069 2070 strSrc.c_str(), szPathReal, 2070 2071 GuestBase::fsObjTypeToStr(GuestBase::fileModeToFsObjType(srcFsObjInfo.Attr.fMode)))); … … 2133 2134 { 2134 2135 delete pFsList; 2135 strErrorInfo.printf(tr("Error adding host source '%s'to list: %Rrc"),2136 strErrorInfo.printf(tr("Error adding host source \"%s\" to list: %Rrc"), 2136 2137 strSrc.c_str(), vrc); 2137 2138 break; … … 2264 2265 default: 2265 2266 setProgressErrorMsg(VBOX_E_IPRT_ERROR, 2266 Utf8StrFmt(tr("Querying information on guest for '%s'failed: %Rrc"),2267 Utf8StrFmt(tr("Querying information on guest for \"%s\" failed: %Rrc"), 2267 2268 strDstRootAbs.c_str(), vrcGuest)); 2268 2269 break; … … 2272 2273 { 2273 2274 setProgressErrorMsg(VBOX_E_IPRT_ERROR, 2274 Utf8StrFmt(tr("Querying information on guest for '%s'failed: %Rrc"),2275 Utf8StrFmt(tr("Querying information on guest for \"%s\" failed: %Rrc"), 2275 2276 strDstRootAbs.c_str(), vrc)); 2276 2277 break; … … 2378 2379 case RTFS_TYPE_DIRECTORY: 2379 2380 { 2380 LogRel2(("Guest Control: Copying directory '%s' from host to '%s' on guest ...\n", strSrcAbs.c_str(), strDstAbs.c_str())); 2381 LogRel2(("Guest Control: Copying directory \"%s\" from host to \"%s\" on guest ...\n", 2382 strSrcAbs.c_str(), strDstAbs.c_str())); 2381 2383 if (!pList->mSourceSpec.fDryRun) 2382 2384 vrc = directoryCreateOnGuest(strDstAbs, fDirMode, DirectoryCreateFlag_None, … … 2393 2395 2394 2396 default: 2395 LogRel2(("Guest Control: Warning: Host file system type 0x%x for '%s'is not supported, skipping\n",2397 LogRel2(("Guest Control: Warning: Host file system type 0x%x for \"%s\" is not supported, skipping\n", 2396 2398 pEntry->fMode & RTFS_TYPE_MASK, strSrcAbs.c_str())); 2397 2399 break;
Note:
See TracChangeset
for help on using the changeset viewer.