Changeset 103435 in vbox for trunk/src/VBox/Storage
- Timestamp:
- Feb 19, 2024 12:45:14 PM (12 months ago)
- svn:sync-xref-src-repo-rev:
- 161764
- Location:
- trunk/src/VBox/Storage
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Storage/ISCSI.cpp
r99739 r103435 5401 5401 char *pszLUN = NULL; 5402 5402 char *pszAddress = NULL; 5403 int rc = VDCFGQueryStringAlloc(VDIfConfigGet(pConfig), "TargetName", &pszTarget); 5404 if (RT_SUCCESS(rc)) 5405 { 5406 rc = VDCFGQueryStringAlloc(VDIfConfigGet(pConfig), "LUN", &pszLUN); 5403 5404 int rc; 5405 PVDINTERFACECONFIG pIfCfg = VDIfConfigGet(pConfig); 5406 if (pIfCfg) 5407 { 5408 rc = VDCFGQueryStringAlloc(pIfCfg, "TargetName", &pszTarget); 5407 5409 if (RT_SUCCESS(rc)) 5408 5410 { 5409 rc = VDCFGQueryStringAlloc( VDIfConfigGet(pConfig), "TargetAddress", &pszAddress);5411 rc = VDCFGQueryStringAlloc(pIfCfg, "LUN", &pszLUN); 5410 5412 if (RT_SUCCESS(rc)) 5411 5413 { 5412 if (RTStrAPrintf(pszLocation, "iscsi://%s/%s/%s", 5413 pszAddress, pszTarget, pszLUN) < 0) 5414 rc = VERR_NO_MEMORY; 5414 rc = VDCFGQueryStringAlloc(pIfCfg, "TargetAddress", &pszAddress); 5415 if (RT_SUCCESS(rc)) 5416 { 5417 if (RTStrAPrintf(pszLocation, "iscsi://%s/%s/%s", 5418 pszAddress, pszTarget, pszLUN) < 0) 5419 rc = VERR_NO_MEMORY; 5420 5421 RTMemFree(pszAddress); 5422 } 5423 RTMemFree(pszLUN); 5415 5424 } 5416 } 5417 } 5418 RTMemFree(pszTarget); 5419 RTMemFree(pszLUN); 5420 RTMemFree(pszAddress); 5425 RTMemFree(pszTarget); 5426 } 5427 } 5428 else 5429 rc = VERR_INVALID_PARAMETER; 5430 5421 5431 return rc; 5422 5432 } … … 5428 5438 char *pszLUN = NULL; 5429 5439 char *pszAddress = NULL; 5430 int rc = VDCFGQueryStringAlloc(VDIfConfigGet(pConfig), "TargetName", &pszTarget); 5431 if (RT_SUCCESS(rc)) 5432 { 5433 rc = VDCFGQueryStringAlloc(VDIfConfigGet(pConfig), "LUN", &pszLUN); 5440 5441 int rc; 5442 PVDINTERFACECONFIG pIfCfg = VDIfConfigGet(pConfig); 5443 if (pIfCfg) 5444 { 5445 rc = VDCFGQueryStringAlloc(pIfCfg, "TargetName", &pszTarget); 5434 5446 if (RT_SUCCESS(rc)) 5435 5447 { 5436 rc = VDCFGQueryStringAlloc( VDIfConfigGet(pConfig), "TargetAddress", &pszAddress);5448 rc = VDCFGQueryStringAlloc(pIfCfg, "LUN", &pszLUN); 5437 5449 if (RT_SUCCESS(rc)) 5438 5450 { 5439 /** @todo think about a nicer looking location scheme for iSCSI */ 5440 if (RTStrAPrintf(pszName, "%s/%s/%s", 5441 pszAddress, pszTarget, pszLUN) < 0) 5442 rc = VERR_NO_MEMORY; 5451 rc = VDCFGQueryStringAlloc(pIfCfg, "TargetAddress", &pszAddress); 5452 if (RT_SUCCESS(rc)) 5453 { 5454 /** @todo think about a nicer looking location scheme for iSCSI */ 5455 if (RTStrAPrintf(pszName, "%s/%s/%s", 5456 pszAddress, pszTarget, pszLUN) < 0) 5457 rc = VERR_NO_MEMORY; 5458 5459 RTMemFree(pszAddress); 5460 } 5461 RTMemFree(pszLUN); 5443 5462 } 5444 }5445 }5446 RTMemFree(pszTarget);5447 RTMemFree(pszLUN);5448 RTMemFree(pszAddress);5463 RTMemFree(pszTarget); 5464 } 5465 } 5466 else 5467 rc = VERR_INVALID_PARAMETER; 5449 5468 5450 5469 return rc; -
trunk/src/VBox/Storage/VISO.cpp
r98103 r103435 674 674 if (fDelete) 675 675 { 676 PVDINTERFACECONFIG pImgCfg = VDIfConfigGet(&pThis->pIfIo->Core); 677 676 PVDINTERFACECONFIG pImgCfg = VDIfConfigGet(&pThis->pIfIo->Core); 677 if (pImgCfg) 678 { 678 679 bool fUnattendedInstall = false; 679 680 int vrc = VDCFGQueryBool(pImgCfg, "UnattendedInstall", &fUnattendedInstall); … … 686 687 if (RT_SUCCESS(vrc) && fUnattendedInstall) 687 688 deleteReferences(pThis); 689 } 690 688 691 vdIfIoIntFileDelete(pThis->pIfIo, pThis->pszFilename); 689 692 }
Note:
See TracChangeset
for help on using the changeset viewer.