VirtualBox

儲存庫 vbox 的更動 16543


忽略:
時間撮記:
2009-2-6 上午11:16:03 (16 年 以前)
作者:
vboxsync
訊息:

Main/HostHardwareLinux: assertions

檔案:
修改 1 筆資料

圖例:

未更動
新增
刪除
  • trunk/src/VBox/Main/linux/HostHardwareLinux.cpp

    r16528 r16543  
    839839                                    bool *pfSuccess)
    840840{
    841 #if 0
    842     AssertRequireReturn(   VALID_PTR(pConnection) && VALID_PTR(pszKey)
    843                         && VALID_PTR(pszValue) && VALID_PTR (pMatches)
    844                         && (pfSuccess == NULL || VALID_PTR (pfSuccess)),
    845                         Valid pointers, VERR_INVALID_POINTER);
    846 #endif
     841    AssertPtrReturn (pConnection, VERR_INVALID_POINTER);
     842    AssertPtrReturn (pszKey, VERR_INVALID_POINTER);
     843    AssertPtrReturn (pszValue, VERR_INVALID_POINTER);
     844    AssertPtrReturn (pMatches, VERR_INVALID_POINTER);
     845    AssertReturn (pfSuccess == NULL || VALID_PTR (pfSuccess), VERR_INVALID_POINTER);
    847846    LogFlowFunc (("pConnection=%p, pszKey=%s, pszValue=%s, pMatches=%p, pfSuccess=%p\n",
    848847                  pConnection, pszKey, pszValue, pMatches, pfSuccess));
     
    872871         dbus_message_iter_next(&iterUdis))
    873872    {
    874         /* Now get all properties from the iterator */
     873        /* Now get all UDIs from the iterator */
    875874        const char *pszUdi;
    876875        dbus_message_iter_get_basic (&iterUdis, &pszUdi);
     
    10101009                                 bool *pfMatches, bool *pfSuccess)
    10111010{
    1012 #if 0
    1013     AssertRequireReturn(   VALID_PTR (pConnection) && VALID_PTR (pszUdi)
    1014                         && VALID_PTR (papszKeys) && VALID_PTR (pMatches)
    1015                         && VALID_PTR (pfMatches)
    1016                         && (pfSuccess == NULL || VALID_PTR (pfSuccess)),
    1017                         Valid pointers, VERR_INVALID_POINTER);
    1018     AssertRequireReturn(pMatches->empty());
    1019 #endif
     1011    AssertPtrReturn (pConnection, VERR_INVALID_POINTER);
     1012    AssertPtrReturn (pszUdi, VERR_INVALID_POINTER);
     1013    AssertPtrReturn (papszKeys, VERR_INVALID_POINTER);
     1014    AssertPtrReturn (pMatches, VERR_INVALID_POINTER);
     1015    AssertReturn ((pfMatches == NULL) || VALID_PTR (pfMatches), VERR_INVALID_POINTER);
     1016    AssertReturn ((pfSuccess == NULL) || VALID_PTR (pfSuccess), VERR_INVALID_POINTER);
     1017    AssertReturn(pMatches->empty(), VERR_INVALID_PARAMETER);
    10201018    LogFlowFunc (("pConnection=%p, pszUdi=%s, cProps=%llu, papszKeys=%p, pMatches=%p, pfMatches=%p, pfSuccess=%p\n",
    10211019                  pConnection, pszUdi, cProps, papszKeys, pMatches, pfMatches, pfSuccess));
     
    10451043    if (pfSuccess != NULL)
    10461044        *pfSuccess = halSuccess;
    1047 #if 0
    10481045    if (RT_SUCCESS(rc) && halSuccess)
    10491046    {
    1050         AssertEnsure (pMatches->size() == cProps, Right number of strings on success);
    1051         AssertEnsureForEach (j, size_t, 0, cProps,
    1052    (pfMatches == NULL)
    1053 || (pfMatches[j] == true)
    1054 || ((pfMatches[j] == false) && (pMatches[j].size() == 0)),
    1055                              On success invalid strings are empty);
    1056     }
    1057 #endif
     1047        Assert (pMatches->size() == cProps);
     1048        AssertForEach (j, size_t, 0, cProps,    (pfMatches == NULL)
     1049                                             || (pfMatches[j] == true)
     1050                                             || ((pfMatches[j] == false) && (pMatches[j].size() == 0)));
     1051    }
    10581052    LogFlowFunc (("rc=%Rrc, halSuccess=%d\n", rc, halSuccess));
    10591053    return rc;
注意: 瀏覽 TracChangeset 來幫助您使用更動檢視器

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette