Changeset 94751 in vbox
- Timestamp:
- Apr 28, 2022 7:12:56 PM (3 years ago)
- Location:
- trunk/src/VBox/Main
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/include/UnattendedInstaller.h
r94749 r94751 593 593 * @returns COM status code 594 594 * @param pEditor Editor with the menu config. file loaded and parsed. 595 * @param pszMenuConfigFileName Name of the menu file. 596 */ 597 HRESULT editDebianMenuCfg(GeneralTextScript *pEditor, const char *pszMenuConfigFileName); 595 */ 596 HRESULT editDebianMenuCfg(GeneralTextScript *pEditor); 598 597 /** 599 598 * Performs basic edits on grub configuration file (grub.cfg). … … 601 600 * @returns COM status code 602 601 * @param pEditor Editor with the grub.cfg file loaded and parsed. 603 * @param pszGrubConfigFileName Name of the grub config file. 604 */ 605 HRESULT editDebianGrubCfg(GeneralTextScript *pEditor, const char *pszGrubConfigFileName); 602 */ 603 HRESULT editDebianGrubCfg(GeneralTextScript *pEditor); 606 604 607 605 /** -
trunk/src/VBox/Main/src-server/UnattendedInstaller.cpp
r94748 r94751 1088 1088 { 1089 1089 if (strMenuConfigFileName.compare("/boot/grub/grub.cfg", RTCString::CaseInsensitive) == 0) 1090 hrc = editDebianGrubCfg(&Editor , strMenuConfigFileName.c_str());1090 hrc = editDebianGrubCfg(&Editor); 1091 1091 else 1092 hrc = editDebianMenuCfg(&Editor , strMenuConfigFileName.c_str());1092 hrc = editDebianMenuCfg(&Editor); 1093 1093 } 1094 1094 if (SUCCEEDED(hrc)) … … 1156 1156 } 1157 1157 1158 HRESULT UnattendedDebianInstaller::editDebianMenuCfg(GeneralTextScript *pEditor , const char *pszMenuConfigFileName)1158 HRESULT UnattendedDebianInstaller::editDebianMenuCfg(GeneralTextScript *pEditor) 1159 1159 { 1160 1160 /* … … 1191 1191 } 1192 1192 if (!fLabelFound) 1193 hrc = VBOX_E_FILE_ERROR;1193 hrc = E_FAIL;; 1194 1194 1195 1195 if (SUCCEEDED(hrc)) … … 1214 1214 } 1215 1215 if (FAILED(hrc)) 1216 return mpParent->setErrorBoth(VBOX_E_FILE_ERROR, hrc, 1217 tr("Failed to edit menu configuration file: \"%s\": (%Rrc)"), 1218 pszMenuConfigFileName, hrc); 1216 return hrc; 1219 1217 } 1220 1218 catch (std::bad_alloc &) … … 1225 1223 } 1226 1224 1227 HRESULT UnattendedDebianInstaller::editDebianGrubCfg(GeneralTextScript *pEditor , const char *pszGrubConfigFileName)1225 HRESULT UnattendedDebianInstaller::editDebianGrubCfg(GeneralTextScript *pEditor) 1228 1226 { 1229 1227 /* Default menu entry of grub.cfg is set in /etc/deafult/grub file. */ … … 1273 1271 } 1274 1272 if (!fSecondWord) 1275 hrc = VBOX_E_FILE_ERROR;1273 hrc = E_FAIL; 1276 1274 1277 1275 if (SUCCEEDED(hrc)) … … 1291 1289 } 1292 1290 if (FAILED(hrc)) 1293 return mpParent->setErrorBoth(VBOX_E_FILE_ERROR, hrc, 1294 tr("Failed to edit grub configuration file: \"%s\": (%Rrc)"), 1295 pszGrubConfigFileName, hrc); 1291 return hrc; 1296 1292 } 1297 1293 }
Note:
See TracChangeset
for help on using the changeset viewer.