Changeset 11484 in vbox for trunk/src/VBox/Devices/Storage
- Timestamp:
- Aug 19, 2008 12:41:38 PM (16 years ago)
- Location:
- trunk/src/VBox/Devices/Storage
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Storage/RawHDDCore.cpp
r11444 r11484 1087 1087 /* papszFileExtensions */ 1088 1088 s_apszRawFileExtensions, 1089 /* paConfigInfo */ 1090 NULL, 1089 1091 /* pfnCheckIfValid */ 1090 1092 rawCheckIfValid, -
trunk/src/VBox/Devices/Storage/VBoxHDD-new.cpp
r11444 r11484 653 653 pEntries[cEntries].uBackendCaps = aBackends[i]->uBackendCaps; 654 654 pEntries[cEntries].papszFileExtensions = aBackends[i]->papszFileExtensions; 655 pEntries[cEntries].paConfigInfo = aBackends[i]->paConfigInfo; 655 656 cEntries++; 656 657 if (cEntries >= cEntriesAlloc) … … 742 743 pEntries[cEntries].uBackendCaps = pBackend->uBackendCaps; 743 744 pEntries[cEntries].papszFileExtensions = pBackend->papszFileExtensions; 745 pEntries[cEntries].paConfigInfo = pBackend->paConfigInfo; 744 746 cEntries++; 745 747 if (cEntries >= cEntriesAlloc) … … 2983 2985 pBackendInfo->uBackendCaps = pImage->Backend->uBackendCaps; 2984 2986 pBackendInfo->papszFileExtensions = pImage->Backend->papszFileExtensions; 2987 pBackendInfo->paConfigInfo = pImage->Backend->paConfigInfo; 2985 2988 rc = VINF_SUCCESS; 2986 2989 } -
trunk/src/VBox/Devices/Storage/VBoxHDD-newInternal.h
r11444 r11484 62 62 */ 63 63 const char * const *papszFileExtensions; 64 65 /** 66 * Pointer to an array of structs describing each supported config key. 67 * Terminated by a NULL config key. Note that some backends do not support 68 * the configuration interface, so this pointer may just contain NULL. 69 * Mandatory if the backend sets VD_CAP_CONFIG. 70 */ 71 PCVDCONFIGINFO paConfigInfo; 64 72 65 73 /** -
trunk/src/VBox/Devices/Storage/VDIHDDCore.cpp
r11444 r11484 1822 1822 /* papszFileExtensions */ 1823 1823 s_apszVdiFileExtensions, 1824 /* paConfigInfo */ 1825 NULL, 1824 1826 /* pfnCheckIfValid */ 1825 1827 vdiCheckIfValid, -
trunk/src/VBox/Devices/Storage/VmdkHDDCore.cpp
r11444 r11484 5182 5182 /* papszFileExtensions */ 5183 5183 s_apszVmdkFileExtensions, 5184 /* paConfigInfo */ 5185 NULL, 5184 5186 /* pfnCheckIfValid */ 5185 5187 vmdkCheckIfValid, -
trunk/src/VBox/Devices/Storage/testcase/tstVD-2.cpp
r11421 r11484 72 72 if (papsz == aVDInfo[i].papszFileExtensions) 73 73 RTPrintf("<EMPTY>"); 74 RTPrintf("\n");75 74 } 76 75 else 77 RTPrintf("<NONE>\n"); 76 RTPrintf("<NONE>"); 77 RTPrintf(" config="); 78 if (aVDInfo[i].paConfigInfo) 79 { 80 PCVDCONFIGINFO pa = aVDInfo[i].paConfigInfo; 81 while (pa->pszKey != NULL) 82 { 83 if (pa != aVDInfo[i].paConfigInfo) 84 RTPrintf(","); 85 RTPrintf("(key=%s type=", pa->pszKey); 86 switch (pa->enmValueType) 87 { 88 case VDCFGVALUETYPE_INTEGER: 89 RTPrintf("integer default="); 90 if (pa->pDefaultValue) 91 RTPrintf("%RU64", pa->pDefaultValue->Integer.u64); 92 else 93 RTPrintf("<NONE>"); 94 break; 95 case VDCFGVALUETYPE_STRING: 96 RTPrintf("string default="); 97 if (pa->pDefaultValue) 98 RTPrintf("%s", pa->pDefaultValue->String.psz); 99 else 100 RTPrintf("<NONE>"); 101 break; 102 case VDCFGVALUETYPE_BYTES: 103 RTPrintf("bytes default="); 104 if (pa->pDefaultValue) 105 RTPrintf("length=%RTuint %.*Rhxs", 106 pa->pDefaultValue->Bytes.cb, 107 pa->pDefaultValue->Bytes.cb, 108 pa->pDefaultValue->Bytes.pv); 109 else 110 RTPrintf("<NONE>"); 111 break; 112 default: 113 RTPrintf("INVALID!"); 114 } 115 RTPrintf(" flags="); 116 if (!pa->uKeyFlags) 117 RTPrintf("none"); 118 unsigned cFlags = 0; 119 if (pa->uKeyFlags & VD_CFGKEY_MANDATORY) 120 { 121 if (cFlags) 122 RTPrintf(","); 123 RTPrintf("mandatory"); 124 cFlags++; 125 } 126 if (pa->uKeyFlags & VD_CFGKEY_EXPERT) 127 { 128 if (cFlags) 129 RTPrintf(","); 130 RTPrintf("expert"); 131 cFlags++; 132 } 133 RTPrintf(")"); 134 pa++; 135 } 136 if (pa == aVDInfo[i].paConfigInfo) 137 RTPrintf("<EMPTY>"); 138 } 139 else 140 RTPrintf("<NONE>"); 141 RTPrintf("\n"); 78 142 } 79 143
Note:
See TracChangeset
for help on using the changeset viewer.