Changeset 67806 in vbox
- Timestamp:
- Jul 5, 2017 3:48:20 PM (8 years ago)
- svn:sync-xref-src-repo-rev:
- 116730
- Location:
- trunk/src/VBox/Devices
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/src/VBox/Devices/Audio/DevHDA.cpp ¶
r67710 r67806 6895 6895 * Attach driver. 6896 6896 */ 6897 char *pszDesc = NULL;6897 char *pszDesc; 6898 6898 if (RTStrAPrintf(&pszDesc, "Audio driver port (HDA) for LUN#%u", uLUN) <= 0) 6899 AssertReleaseMsgReturn(pszDesc, 6900 ("Not enough memory for HDA driver port description of LUN #%u\n", uLUN), 6901 VERR_NO_MEMORY); 6899 AssertLogRelFailedReturn(VERR_NO_MEMORY); 6902 6900 6903 6901 PPDMIBASE pDrvBase; -
TabularUnified trunk/src/VBox/Devices/Audio/DevIchAc97.cpp ¶
r67780 r67806 3221 3221 * Attach driver. 3222 3222 */ 3223 char *pszDesc = NULL;3223 char *pszDesc; 3224 3224 if (RTStrAPrintf(&pszDesc, "Audio driver port (AC'97) for LUN #%u", uLUN) <= 0) 3225 AssertReleaseMsgReturn(pszDesc, 3226 ("Not enough memory for AC'97 driver port description of LUN #%u\n", uLUN), 3227 VERR_NO_MEMORY); 3225 AssertLogRelFailedReturn(VERR_NO_MEMORY); 3228 3226 3229 3227 PPDMIBASE pDrvBase; -
TabularUnified trunk/src/VBox/Devices/Audio/DevSB16.cpp ¶
r67717 r67806 219 219 * Attach driver. 220 220 */ 221 char *pszDesc = NULL;221 char *pszDesc; 222 222 if (RTStrAPrintf(&pszDesc, "Audio driver port (SB16) for LUN #%u", uLUN) <= 0) 223 AssertReleaseMsgReturn(pszDesc, 224 ("Not enough memory for SB16 driver port description of LUN #%u\n", uLUN), 225 VERR_NO_MEMORY); 223 AssertLogRelFailedReturn(VERR_NO_MEMORY); 226 224 227 225 PPDMIBASE pDrvBase; -
TabularUnified trunk/src/VBox/Devices/Storage/DevAHCI.cpp ¶
r67681 r67806 6020 6020 for (i = 0; i < pThis->cPortsImpl; i++) 6021 6021 { 6022 char szName[24]; 6023 RTStrPrintf(szName, sizeof(szName), "Port%u", i); 6022 char *pszName; 6023 if (RTStrAPrintf(&pszName, "Port%u", i) <= 0) 6024 AssertLogRelFailedReturn(VERR_NO_MEMORY); 6024 6025 6025 6026 PAHCIPort pAhciPort = &pThis->ahciPort[i]; … … 6039 6040 6040 6041 /* Query per port configuration options if available. */ 6041 PCFGMNODE pCfgPort = CFGMR3GetChild(pDevIns->pCfg, szName);6042 PCFGMNODE pCfgPort = CFGMR3GetChild(pDevIns->pCfg, pszName); 6042 6043 if (pCfgPort) 6043 6044 { … … 6051 6052 * Attach the block driver 6052 6053 */ 6053 rc = PDMDevHlpDriverAttach(pDevIns, pAhciPort->iLUN, &pAhciPort->IBase, &pAhciPort->pDrvBase, szName);6054 rc = PDMDevHlpDriverAttach(pDevIns, pAhciPort->iLUN, &pAhciPort->IBase, &pAhciPort->pDrvBase, pszName); 6054 6055 if (RT_SUCCESS(rc)) 6055 6056 { … … 6057 6058 if (RT_FAILURE(rc)) 6058 6059 { 6059 Log(("%s: Failed to configure the %s.\n", __FUNCTION__, szName));6060 Log(("%s: Failed to configure the %s.\n", __FUNCTION__, pszName)); 6060 6061 return rc; 6061 6062 } … … 6068 6069 * Init vendor product data. 6069 6070 */ 6070 rc = ahciR3VpdInit(pDevIns, pAhciPort, szName);6071 rc = ahciR3VpdInit(pDevIns, pAhciPort, pszName); 6071 6072 if (RT_FAILURE(rc)) 6072 6073 return rc; … … 6078 6079 6079 6080 rc = PDMDevHlpThreadCreate(pDevIns, &pAhciPort->pAsyncIOThread, pAhciPort, ahciAsyncIOLoop, 6080 ahciAsyncIOLoopWakeUp, 0, RTTHREADTYPE_IO, szName);6081 ahciAsyncIOLoopWakeUp, 0, RTTHREADTYPE_IO, pszName); 6081 6082 if (RT_FAILURE(rc)) 6082 6083 return PDMDevHlpVMSetError(pDevIns, rc, RT_SRC_POS, 6083 N_("AHCI: Failed to create worker thread %s"), szName);6084 N_("AHCI: Failed to create worker thread %s"), pszName); 6084 6085 } 6085 6086 else if (rc == VERR_PDM_NO_ATTACHED_DRIVER) … … 6087 6088 pAhciPort->pDrvBase = NULL; 6088 6089 rc = VINF_SUCCESS; 6089 LogRel(("AHCI: %s: No driver attached\n", szName));6090 LogRel(("AHCI: %s: No driver attached\n", pszName)); 6090 6091 } 6091 6092 else 6092 6093 return PDMDevHlpVMSetError(pDevIns, rc, RT_SRC_POS, 6093 N_("AHCI: Failed to attach drive to %s"), szName);6094 N_("AHCI: Failed to attach drive to %s"), pszName); 6094 6095 } 6095 6096 -
TabularUnified trunk/src/VBox/Devices/Storage/DevBusLogic.cpp ¶
r67682 r67806 4154 4154 PBUSLOGICDEVICE pDevice = &pThis->aDeviceStates[i]; 4155 4155 4156 RTStrPrintf(szName, sizeof(szName), "Device%u", i); 4156 char *pszName; 4157 if (RTStrAPrintf(&pszName, "Device%u", i) < 0) 4158 AssertLogRelFailedReturn(VERR_NO_MEMORY); 4157 4159 4158 4160 /* Initialize static parts of the device. */ … … 4174 4176 4175 4177 /* Attach SCSI driver. */ 4176 rc = PDMDevHlpDriverAttach(pDevIns, pDevice->iLUN, &pDevice->IBase, &pDevice->pDrvBase, szName);4178 rc = PDMDevHlpDriverAttach(pDevIns, pDevice->iLUN, &pDevice->IBase, &pDevice->pDrvBase, pszName); 4177 4179 if (RT_SUCCESS(rc)) 4178 4180 { -
TabularUnified trunk/src/VBox/Devices/Storage/DevLsiLogicSCSI.cpp ¶
r65648 r67806 5595 5595 for (unsigned i = 0; i < pThis->cDeviceStates; i++) 5596 5596 { 5597 char szName[24];5598 5597 PLSILOGICDEVICE pDevice = &pThis->paDeviceStates[i]; 5599 5598 … … 5613 5612 pDevice->ILed.pfnQueryStatusLed = lsilogicR3DeviceQueryStatusLed; 5614 5613 5615 RTStrPrintf(szName, sizeof(szName), "Device%u", i); 5614 char *pszName; 5615 if (RTStrAPrintf(&pszName, "Device%u", i) <= 0) 5616 AssertLogRelFailedReturn(VERR_NO_MEMORY); 5616 5617 5617 5618 /* Attach SCSI driver. */ 5618 rc = PDMDevHlpDriverAttach(pDevIns, pDevice->iLUN, &pDevice->IBase, &pDevice->pDrvBase, szName);5619 rc = PDMDevHlpDriverAttach(pDevIns, pDevice->iLUN, &pDevice->IBase, &pDevice->pDrvBase, pszName); 5619 5620 if (RT_SUCCESS(rc)) 5620 5621 { … … 5641 5642 pDevice->pDrvBase = NULL; 5642 5643 rc = VINF_SUCCESS; 5643 Log(("LsiLogic: no driver attached to device %s\n", szName));5644 Log(("LsiLogic: no driver attached to device %s\n", pszName)); 5644 5645 } 5645 5646 else 5646 5647 { 5647 AssertLogRelMsgFailed(("LsiLogic: Failed to attach %s\n", szName));5648 AssertLogRelMsgFailed(("LsiLogic: Failed to attach %s\n", pszName)); 5648 5649 return rc; 5649 5650 }
Note:
See TracChangeset
for help on using the changeset viewer.