Changeset 12328 in vbox for trunk/src/VBox/Devices
- Timestamp:
- Sep 10, 2008 8:14:31 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Storage/VBoxHDD-new.cpp
r12143 r12328 752 752 pEntries[cEntries].pszBackend = pszName; 753 753 pEntries[cEntries].uBackendCaps = pBackend->uBackendCaps; 754 pEntries[cEntries].papszFileExtensions = pBackend->papszFileExtensions; 755 pEntries[cEntries].paConfigInfo = pBackend->paConfigInfo; 754 unsigned cExts, iExt; 755 for (cExts=0; pBackend->papszFileExtensions[cExts]; cExts++) 756 ; 757 const char **paExts = (const char **)RTMemAlloc((cExts+1) * sizeof(paExts[0])); 758 for (iExt=0; iExt < cExts; iExt++) 759 { 760 paExts[iExt] = (const char*)RTStrDup(pBackend->papszFileExtensions[iExt]); 761 if (!paExts[iExt]) 762 { 763 rc = VERR_NO_MEMORY; 764 break; 765 } 766 } 767 paExts[iExt] = NULL; 768 if (RT_FAILURE(rc)) 769 break; 770 pEntries[cEntries].papszFileExtensions = paExts; 771 if (pBackend->paConfigInfo != NULL) 772 { 773 /* copy the whole config field! */ 774 rc = VERR_NOT_IMPLEMENTED; 775 break; 776 } 777 pEntries[cEntries].paConfigInfo = NULL; 756 778 cEntries++; 757 779 if (cEntries >= cEntriesAlloc)
Note:
See TracChangeset
for help on using the changeset viewer.