Changeset 66494 in vbox for trunk/src/VBox/Storage/QED.cpp
- Timestamp:
- Apr 10, 2017 9:57:25 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Storage/QED.cpp
r66486 r66494 33 33 34 34 #include "VDBackends.h" 35 #include "VDBackendsInline.h" 35 36 36 37 /** … … 2125 2126 2126 2127 /** @copydoc VDIMAGEBACKEND::pfnGetComment */ 2127 static DECLCALLBACK(int) qedGetComment(void *pBackendData, char *pszComment, 2128 size_t cbComment) 2129 { 2130 RT_NOREF2(pszComment, cbComment); 2131 LogFlowFunc(("pBackendData=%#p pszComment=%#p cbComment=%zu\n", pBackendData, pszComment, cbComment)); 2132 PQEDIMAGE pImage = (PQEDIMAGE)pBackendData; 2133 2134 AssertPtrReturn(pImage, VERR_VD_NOT_OPENED); 2135 2136 LogFlowFunc(("returns %Rrc comment='%s'\n", VERR_NOT_SUPPORTED, pszComment)); 2137 return VERR_NOT_SUPPORTED; 2138 } 2128 VD_BACKEND_CALLBACK_GET_COMMENT_DEF_NOT_SUPPORTED(qedGetComment); 2139 2129 2140 2130 /** @copydoc VDIMAGEBACKEND::pfnSetComment */ 2141 static DECLCALLBACK(int) qedSetComment(void *pBackendData, const char *pszComment) 2142 { 2143 RT_NOREF1(pszComment); 2144 LogFlowFunc(("pBackendData=%#p pszComment=\"%s\"\n", pBackendData, pszComment)); 2145 PQEDIMAGE pImage = (PQEDIMAGE)pBackendData; 2146 2147 AssertPtrReturn(pImage, VERR_VD_NOT_OPENED); 2148 2149 int rc; 2150 if (pImage->uOpenFlags & VD_OPEN_FLAGS_READONLY) 2151 rc = VERR_VD_IMAGE_READ_ONLY; 2152 else 2153 rc = VERR_NOT_SUPPORTED; 2154 2155 LogFlowFunc(("returns %Rrc\n", rc)); 2156 return rc; 2157 } 2131 VD_BACKEND_CALLBACK_SET_COMMENT_DEF_NOT_SUPPORTED(qedSetComment, PQEDIMAGE); 2158 2132 2159 2133 /** @copydoc VDIMAGEBACKEND::pfnGetUuid */ 2160 static DECLCALLBACK(int) qedGetUuid(void *pBackendData, PRTUUID pUuid) 2161 { 2162 RT_NOREF1(pUuid); 2163 LogFlowFunc(("pBackendData=%#p pUuid=%#p\n", pBackendData, pUuid)); 2164 PQEDIMAGE pImage = (PQEDIMAGE)pBackendData; 2165 2166 AssertPtrReturn(pImage, VERR_VD_NOT_OPENED); 2167 2168 LogFlowFunc(("returns %Rrc (%RTuuid)\n", VERR_NOT_SUPPORTED, pUuid)); 2169 return VERR_NOT_SUPPORTED; 2170 } 2134 VD_BACKEND_CALLBACK_GET_UUID_DEF_NOT_SUPPORTED(qedGetUuid); 2171 2135 2172 2136 /** @copydoc VDIMAGEBACKEND::pfnSetUuid */ 2173 static DECLCALLBACK(int) qedSetUuid(void *pBackendData, PCRTUUID pUuid) 2174 { 2175 RT_NOREF1(pUuid); 2176 LogFlowFunc(("pBackendData=%#p Uuid=%RTuuid\n", pBackendData, pUuid)); 2177 PQEDIMAGE pImage = (PQEDIMAGE)pBackendData; 2178 2179 AssertPtrReturn(pImage, VERR_VD_NOT_OPENED); 2180 2181 int rc; 2182 if (pImage->uOpenFlags & VD_OPEN_FLAGS_READONLY) 2183 rc = VERR_VD_IMAGE_READ_ONLY; 2184 else 2185 rc = VERR_NOT_SUPPORTED; 2186 2187 LogFlowFunc(("returns %Rrc\n", rc)); 2188 return rc; 2189 } 2137 VD_BACKEND_CALLBACK_SET_UUID_DEF_NOT_SUPPORTED(qedSetUuid, PQEDIMAGE); 2190 2138 2191 2139 /** @copydoc VDIMAGEBACKEND::pfnGetModificationUuid */ 2192 static DECLCALLBACK(int) qedGetModificationUuid(void *pBackendData, PRTUUID pUuid) 2193 { 2194 RT_NOREF1(pUuid); 2195 LogFlowFunc(("pBackendData=%#p pUuid=%#p\n", pBackendData, pUuid)); 2196 PQEDIMAGE pImage = (PQEDIMAGE)pBackendData; 2197 2198 AssertPtrReturn(pImage, VERR_VD_NOT_OPENED); 2199 2200 LogFlowFunc(("returns %Rrc (%RTuuid)\n", VERR_NOT_SUPPORTED, pUuid)); 2201 return VERR_NOT_SUPPORTED; 2202 } 2140 VD_BACKEND_CALLBACK_GET_UUID_DEF_NOT_SUPPORTED(qedGetModificationUuid); 2203 2141 2204 2142 /** @copydoc VDIMAGEBACKEND::pfnSetModificationUuid */ 2205 static DECLCALLBACK(int) qedSetModificationUuid(void *pBackendData, PCRTUUID pUuid) 2206 { 2207 RT_NOREF1(pUuid); 2208 LogFlowFunc(("pBackendData=%#p Uuid=%RTuuid\n", pBackendData, pUuid)); 2209 PQEDIMAGE pImage = (PQEDIMAGE)pBackendData; 2210 2211 AssertPtrReturn(pImage, VERR_VD_NOT_OPENED); 2212 2213 int rc; 2214 if (pImage->uOpenFlags & VD_OPEN_FLAGS_READONLY) 2215 rc = VERR_VD_IMAGE_READ_ONLY; 2216 else 2217 rc = VERR_NOT_SUPPORTED; 2218 2219 LogFlowFunc(("returns %Rrc\n", rc)); 2220 return rc; 2221 } 2143 VD_BACKEND_CALLBACK_SET_UUID_DEF_NOT_SUPPORTED(qedSetModificationUuid, PQEDIMAGE); 2222 2144 2223 2145 /** @copydoc VDIMAGEBACKEND::pfnGetParentUuid */ 2224 static DECLCALLBACK(int) qedGetParentUuid(void *pBackendData, PRTUUID pUuid) 2225 { 2226 RT_NOREF1(pUuid); 2227 LogFlowFunc(("pBackendData=%#p pUuid=%#p\n", pBackendData, pUuid)); 2228 PQEDIMAGE pImage = (PQEDIMAGE)pBackendData; 2229 2230 AssertPtrReturn(pImage, VERR_VD_NOT_OPENED); 2231 2232 LogFlowFunc(("returns %Rrc (%RTuuid)\n", VERR_NOT_SUPPORTED, pUuid)); 2233 return VERR_NOT_SUPPORTED; 2234 } 2146 VD_BACKEND_CALLBACK_GET_UUID_DEF_NOT_SUPPORTED(qedGetParentUuid); 2235 2147 2236 2148 /** @copydoc VDIMAGEBACKEND::pfnSetParentUuid */ 2237 static DECLCALLBACK(int) qedSetParentUuid(void *pBackendData, PCRTUUID pUuid) 2238 { 2239 RT_NOREF1(pUuid); 2240 LogFlowFunc(("pBackendData=%#p Uuid=%RTuuid\n", pBackendData, pUuid)); 2241 PQEDIMAGE pImage = (PQEDIMAGE)pBackendData; 2242 2243 AssertPtrReturn(pImage, VERR_VD_NOT_OPENED); 2244 2245 int rc; 2246 if (pImage->uOpenFlags & VD_OPEN_FLAGS_READONLY) 2247 rc = VERR_VD_IMAGE_READ_ONLY; 2248 else 2249 rc = VERR_NOT_SUPPORTED; 2250 2251 LogFlowFunc(("returns %Rrc\n", rc)); 2252 return rc; 2253 } 2149 VD_BACKEND_CALLBACK_SET_UUID_DEF_NOT_SUPPORTED(qedSetParentUuid, PQEDIMAGE); 2254 2150 2255 2151 /** @copydoc VDIMAGEBACKEND::pfnGetParentModificationUuid */ 2256 static DECLCALLBACK(int) qedGetParentModificationUuid(void *pBackendData, PRTUUID pUuid) 2257 { 2258 RT_NOREF1(pUuid); 2259 LogFlowFunc(("pBackendData=%#p pUuid=%#p\n", pBackendData, pUuid)); 2260 PQEDIMAGE pImage = (PQEDIMAGE)pBackendData; 2261 2262 AssertPtrReturn(pImage, VERR_VD_NOT_OPENED); 2263 2264 LogFlowFunc(("returns %Rrc (%RTuuid)\n", VERR_NOT_SUPPORTED, pUuid)); 2265 return VERR_NOT_SUPPORTED; 2266 } 2152 VD_BACKEND_CALLBACK_GET_UUID_DEF_NOT_SUPPORTED(qedGetParentModificationUuid); 2267 2153 2268 2154 /** @copydoc VDIMAGEBACKEND::pfnSetParentModificationUuid */ 2269 static DECLCALLBACK(int) qedSetParentModificationUuid(void *pBackendData, PCRTUUID pUuid) 2270 { 2271 RT_NOREF1(pUuid); 2272 LogFlowFunc(("pBackendData=%#p Uuid=%RTuuid\n", pBackendData, pUuid)); 2273 PQEDIMAGE pImage = (PQEDIMAGE)pBackendData; 2274 2275 AssertPtrReturn(pImage, VERR_VD_NOT_OPENED); 2276 2277 int rc; 2278 if (pImage->uOpenFlags & VD_OPEN_FLAGS_READONLY) 2279 rc = VERR_VD_IMAGE_READ_ONLY; 2280 else 2281 rc = VERR_NOT_SUPPORTED; 2282 2283 LogFlowFunc(("returns %Rrc\n", rc)); 2284 return rc; 2285 } 2155 VD_BACKEND_CALLBACK_SET_UUID_DEF_NOT_SUPPORTED(qedSetParentModificationUuid, PQEDIMAGE); 2286 2156 2287 2157 /** @copydoc VDIMAGEBACKEND::pfnDump */
Note:
See TracChangeset
for help on using the changeset viewer.