Changeset 34418 in vbox for trunk/src/VBox/Runtime
- Timestamp:
- Nov 26, 2010 5:25:58 PM (14 years ago)
- svn:sync-xref-src-repo-rev:
- 68189
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/common/checksum/manifest2.cpp
r34385 r34418 222 222 223 223 224 /**225 * Compares two manifests for equality.226 *227 * @returns true if equals, false if not.228 * @param hManifest1 The first manifest.229 * @param hManifest2 The second manifest.230 * @param papszIgnoreEntries Entries to ignore. Ends with a NULL entry.231 * @param papszIgnoreAttrs Attributes to ignore. Ends with a NULL entry.232 */233 224 RTDECL(int) RTManifestEqualsEx(RTMANIFEST hManifest1, RTMANIFEST hManifest2, const char * const *papszIgnoreEntries, 234 const char * const *papszIgnoreAttr) 235 { 225 const char * const *papszIgnoreAttr, char *pszEntry, size_t cbEntry) 226 { 227 /* 228 * Validate input. 229 */ 230 AssertPtrNullReturn(pszEntry, VERR_INVALID_POINTER); 231 if (pszEntry && cbEntry) 232 *pszEntry = '\0'; 236 233 RTMANIFESTINT *pThis1 = hManifest1; 237 234 RTMANIFESTINT *pThis2 = hManifest1; 238 235 if (pThis1 != NIL_RTMANIFEST) 239 236 { 240 AssertPtrReturn(pThis1, false);241 AssertReturn(pThis1->u32Magic == RTMANIFEST_MAGIC, false);237 AssertPtrReturn(pThis1, VERR_INVALID_HANDLE); 238 AssertReturn(pThis1->u32Magic == RTMANIFEST_MAGIC, VERR_INVALID_HANDLE); 242 239 } 243 240 if (pThis2 != NIL_RTMANIFEST) 244 241 { 245 AssertPtrReturn(pThis2, false);246 AssertReturn(pThis2->u32Magic == RTMANIFEST_MAGIC, false);242 AssertPtrReturn(pThis2, VERR_INVALID_HANDLE); 243 AssertReturn(pThis2->u32Magic == RTMANIFEST_MAGIC, VERR_INVALID_HANDLE); 247 244 } 248 245 … … 251 248 */ 252 249 if (pThis1 == pThis2) 253 return true;250 return VINF_SUCCESS; 254 251 if (pThis1 == NIL_RTMANIFEST || pThis2 == NIL_RTMANIFEST) 255 return false;252 return VERR_NOT_EQUAL; 256 253 257 254 /* … … 266 263 267 264 268 /**269 * Compares two manifests for equality.270 *271 * @returns true if equals, false if not.272 * @param hManifest1 The first manifest.273 * @param hManifest2 The second manifest.274 */275 265 RTDECL(int) RTManifestEquals(RTMANIFEST hManifest1, RTMANIFEST hManifest2) 276 266 { 277 return RTManifestEqualsEx(hManifest1, hManifest2, NULL /*papszIgnoreEntries*/, NULL /*papszIgnoreAttrs*/ );267 return RTManifestEqualsEx(hManifest1, hManifest2, NULL /*papszIgnoreEntries*/, NULL /*papszIgnoreAttrs*/, NULL, 0); 278 268 } 279 269
Note:
See TracChangeset
for help on using the changeset viewer.