Changeset 90828 in vbox for trunk/src/VBox/Main/src-server/UnattendedInstaller.cpp
- Timestamp:
- Aug 24, 2021 9:44:46 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-server/UnattendedInstaller.cpp
r86270 r90828 165 165 if (RT_FAILURE(vrc)) 166 166 return mpParent->setErrorBoth(E_FAIL, vrc, 167 mpParent->tr("Failed to construct path to the unattended installer script templates (%Rrc)"),167 tr("Failed to construct path to the unattended installer script templates (%Rrc)"), 168 168 vrc); 169 169 } … … 183 183 if (RT_FAILURE(vrc)) 184 184 return mpParent->setErrorBoth(E_FAIL, vrc, 185 mpParent->tr("Failed to construct path to the unattended installer script templates (%Rrc)"),185 tr("Failed to construct path to the unattended installer script templates (%Rrc)"), 186 186 vrc); 187 187 } … … 208 208 */ 209 209 if (mpParent->i_getIsoPath().isEmpty()) 210 return mpParent->setError(E_INVALIDARG, mpParent->tr("Cannot proceed with an empty installation ISO path"));210 return mpParent->setError(E_INVALIDARG, tr("Cannot proceed with an empty installation ISO path")); 211 211 if (mpParent->i_getUser().isEmpty()) 212 return mpParent->setError(E_INVALIDARG, mpParent->tr("Empty user name is not allowed"));212 return mpParent->setError(E_INVALIDARG, tr("Empty user name is not allowed")); 213 213 if (mpParent->i_getPassword().isEmpty()) 214 return mpParent->setError(E_INVALIDARG, mpParent->tr("Empty password is not allowed"));214 return mpParent->setError(E_INVALIDARG, tr("Empty password is not allowed")); 215 215 216 216 LogRelFunc(("UnattendedInstaller::savePassedData(): \n")); … … 372 372 373 373 if (RTErrInfoIsSet(&ErrInfo.Core)) 374 hrc = mpParent->setErrorBoth(E_FAIL, vrc, mpParent->tr("Failed to open newly created floppy image '%s': %Rrc: %s"),374 hrc = mpParent->setErrorBoth(E_FAIL, vrc, tr("Failed to open newly created floppy image '%s': %Rrc: %s"), 375 375 pszFilename, vrc, ErrInfo.Core.pszMsg); 376 376 else 377 hrc = mpParent->setErrorBoth(E_FAIL, vrc, mpParent->tr("Failed to open newly created floppy image '%s': %Rrc"),377 hrc = mpParent->setErrorBoth(E_FAIL, vrc, tr("Failed to open newly created floppy image '%s': %Rrc"), 378 378 pszFilename, vrc); 379 379 } 380 380 else 381 hrc = mpParent->setErrorBoth(E_FAIL, vrc, mpParent->tr("Failed to format floppy image '%s': %Rrc"), pszFilename, vrc);381 hrc = mpParent->setErrorBoth(E_FAIL, vrc, tr("Failed to format floppy image '%s': %Rrc"), pszFilename, vrc); 382 382 RTVfsFileRelease(hVfsFile); 383 383 RTFileDelete(pszFilename); 384 384 } 385 385 else 386 hrc = mpParent->setErrorBoth(E_FAIL, vrc, mpParent->tr("Failed to create floppy image '%s': %Rrc"), pszFilename, vrc);386 hrc = mpParent->setErrorBoth(E_FAIL, vrc, tr("Failed to create floppy image '%s': %Rrc"), pszFilename, vrc); 387 387 return hrc; 388 388 } … … 425 425 else 426 426 hrc = mpParent->setErrorBoth(E_FAIL, vrc, 427 mpParent->tr("Error writing %zu bytes to '%s' in floppy image '%s': %Rrc"),427 tr("Error writing %zu bytes to '%s' in floppy image '%s': %Rrc"), 428 428 strScript.length(), pEditor->getDefaultFilename(), 429 429 getAuxiliaryFloppyFilePath().c_str()); … … 433 433 else 434 434 hrc = mpParent->setErrorBoth(E_FAIL, vrc, 435 mpParent->tr("Error creating '%s' in floppy image '%s': %Rrc"),435 tr("Error creating '%s' in floppy image '%s': %Rrc"), 436 436 pEditor->getDefaultFilename(), getAuxiliaryFloppyFilePath().c_str()); 437 437 return hrc; … … 505 505 int vrc = RTVfsFileOpenNormal(pszIsoPath, RTFILE_O_READ | RTFILE_O_OPEN | RTFILE_O_DENY_WRITE, &hOrgIsoFile); 506 506 if (RT_FAILURE(vrc)) 507 return mpParent->setErrorBoth(E_FAIL, vrc, mpParent->tr("Failed to open ISO image '%s' (%Rrc)"), pszIsoPath, vrc);507 return mpParent->setErrorBoth(E_FAIL, vrc, tr("Failed to open ISO image '%s' (%Rrc)"), pszIsoPath, vrc); 508 508 509 509 /* Pass the file to the ISO file system interpreter. */ … … 514 514 return S_OK; 515 515 if (RTErrInfoIsSet(&ErrInfo.Core)) 516 return mpParent->setErrorBoth(E_FAIL, vrc, mpParent->tr("ISO reader fail to open '%s' (%Rrc): %s"),516 return mpParent->setErrorBoth(E_FAIL, vrc, tr("ISO reader fail to open '%s' (%Rrc): %s"), 517 517 pszIsoPath, vrc, ErrInfo.Core.pszMsg); 518 return mpParent->setErrorBoth(E_FAIL, vrc, mpParent->tr("ISO reader fail to open '%s' (%Rrc)"), pszIsoPath, vrc);518 return mpParent->setErrorBoth(E_FAIL, vrc, tr("ISO reader fail to open '%s' (%Rrc)"), pszIsoPath, vrc); 519 519 } 520 520 … … 524 524 if (RT_SUCCESS(vrc)) 525 525 return S_OK; 526 return mpParent->setErrorBoth(E_FAIL, vrc, mpParent->tr("RTFsIsoMakerCreate failed (%Rrc)"), vrc);526 return mpParent->setErrorBoth(E_FAIL, vrc, tr("RTFsIsoMakerCreate failed (%Rrc)"), vrc); 527 527 } 528 528 … … 583 583 else 584 584 hrc = mpParent->setErrorBoth(E_FAIL, vrc, 585 mpParent->tr("RTFsIsoMakerAddFileWithVfsFile failed on the script '%s' (%Rrc)"),585 tr("RTFsIsoMakerAddFileWithVfsFile failed on the script '%s' (%Rrc)"), 586 586 pszDstFilename, vrc); 587 587 } 588 588 else 589 589 hrc = mpParent->setErrorBoth(E_FAIL, vrc, 590 mpParent->tr("RTVfsFileFromBuffer failed on the %zu byte script '%s' (%Rrc)"),590 tr("RTVfsFileFromBuffer failed on the %zu byte script '%s' (%Rrc)"), 591 591 cchScript, pszDstFilename, vrc); 592 592 } … … 601 601 int vrc = RTFsIsoMakerFinalize(hIsoMaker); 602 602 if (RT_FAILURE(vrc)) 603 return mpParent->setErrorBoth(E_FAIL, vrc, mpParent->tr("RTFsIsoMakerFinalize failed (%Rrc)"), vrc);603 return mpParent->setErrorBoth(E_FAIL, vrc, tr("RTFsIsoMakerFinalize failed (%Rrc)"), vrc); 604 604 605 605 /* … … 616 616 { 617 617 if (vrc == VERR_ALREADY_EXISTS) 618 return mpParent->setErrorBoth(E_FAIL, vrc, mpParent->tr("The auxiliary ISO image file '%s' already exists"),618 return mpParent->setErrorBoth(E_FAIL, vrc, tr("The auxiliary ISO image file '%s' already exists"), 619 619 pszFilename); 620 return mpParent->setErrorBoth(E_FAIL, vrc, mpParent->tr("Failed to open the auxiliary ISO image file '%s' for writing (%Rrc)"),620 return mpParent->setErrorBoth(E_FAIL, vrc, tr("Failed to open the auxiliary ISO image file '%s' for writing (%Rrc)"), 621 621 pszFilename, vrc); 622 622 } … … 639 639 hrc = S_OK; 640 640 else 641 hrc = mpParent->setErrorBoth(E_FAIL, vrc, mpParent->tr("Error writing auxiliary ISO image '%s' (%Rrc)"),641 hrc = mpParent->setErrorBoth(E_FAIL, vrc, tr("Error writing auxiliary ISO image '%s' (%Rrc)"), 642 642 pszFilename, vrc); 643 643 } 644 644 else 645 645 hrc = mpParent->setErrorBoth(E_FAIL, VERR_INTERNAL_ERROR_2, 646 mpParent->tr("Internal Error: Failed to case VFS file to VFS I/O stream"));646 tr("Internal Error: Failed to case VFS file to VFS I/O stream")); 647 647 RTVfsIoStrmRelease(hVfsSrcIso); 648 648 RTVfsIoStrmRelease(hVfsDstIso); 649 649 } 650 650 else 651 hrc = mpParent->setErrorBoth(E_FAIL, vrc, mpParent->tr("RTFsIsoMakerCreateVfsOutputFile failed (%Rrc)"), vrc);651 hrc = mpParent->setErrorBoth(E_FAIL, vrc, tr("RTFsIsoMakerCreateVfsOutputFile failed (%Rrc)"), vrc); 652 652 RTVfsFileRelease(hVfsSrcFile); 653 653 RTVfsFileRelease(hVfsDstFile); … … 757 757 RTMemTmpFree(papszArgs); 758 758 if (RT_FAILURE(vrc)) 759 return mpParent->setErrorBoth(E_FAIL, vrc, mpParent->tr("RTGetOptArgvToString failed (%Rrc)"), vrc);759 return mpParent->setErrorBoth(E_FAIL, vrc, tr("RTGetOptArgvToString failed (%Rrc)"), vrc); 760 760 761 761 /* … … 780 780 hrc = S_OK; 781 781 else 782 hrc = mpParent->setErrorBoth(VBOX_E_FILE_ERROR, vrc, mpParent->tr("Error writing '%s' (%Rrc)"), pszFilename, vrc);782 hrc = mpParent->setErrorBoth(VBOX_E_FILE_ERROR, vrc, tr("Error writing '%s' (%Rrc)"), pszFilename, vrc); 783 783 } 784 784 else 785 hrc = mpParent->setErrorBoth(VBOX_E_FILE_ERROR, vrc, mpParent->tr("Failed to create '%s' (%Rrc)"), pszFilename, vrc);785 hrc = mpParent->setErrorBoth(VBOX_E_FILE_ERROR, vrc, tr("Failed to create '%s' (%Rrc)"), pszFilename, vrc); 786 786 787 787 RTStrFree(pszCmdLine); … … 802 802 } 803 803 else 804 hrc = mpParent->setErrorBoth(VBOX_E_FILE_ERROR, vrc, mpParent->tr("Failed to open '%s' on the ISO '%s' (%Rrc)"),804 hrc = mpParent->setErrorBoth(VBOX_E_FILE_ERROR, vrc, tr("Failed to open '%s' on the ISO '%s' (%Rrc)"), 805 805 pszFilename, mpParent->i_getIsoPath().c_str(), vrc); 806 806 return hrc;
Note:
See TracChangeset
for help on using the changeset viewer.