VirtualBox

Changeset 14344 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Nov 19, 2008 10:50:48 AM (16 years ago)
Author:
vboxsync
Message:

Storage/VBoxHDD-new: Fix error handling in VDBackendInfo. Caused trouble on Windows. Added a tad more logging too.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Storage/VBoxHDD-new.cpp

    r14062 r14344  
    688688        rc = RTDirOpenFiltered(&pPluginDir, pszPluginFilter, RTDIRFILTER_WINNT);
    689689        if (RT_FAILURE(rc))
     690        {
     691            /* On Windows the above immediately signals that there are no
     692             * files matching, while on other platforms enumerating the
     693             * files below fails. Either way: no plugins. */
    690694            break;
     695        }
    691696
    692697        PRTDIRENTRYEX pPluginDirEntry = NULL;
     
    774779                            }
    775780                        }
    776                         if (RT_FAILURE(rc))
    777                             break;
    778781                        paExts[iExt] = NULL;
    779782                        pEntries[cEntries].papszFileExtensions = paExts;
     
    792795                        }
    793796                    }
     797                    else
     798                        LogFunc(("ignored plugin '%s': pBackend->cbSize=%d rc=%Vrc\n", pszPluginPath, pBackend->cbSize, rc));
    794799                }
    795800                else
    796                     pBackend = NULL;
     801                    LogFunc(("ignored plugin '%s': rc=%Vrc\n", pszPluginPath, rc));
    797802
    798803                RTLdrClose(hPlugin);
     
    808813            RTDirClose(pPluginDir);
    809814    } while (0);
     815    /* Ignore any files which can't be found. Happens e.g. on Windows when
     816     * absolutely no plugins are installed (see above). Totally harmless. */
     817    if (rc == VERR_FILE_NOT_FOUND)
     818        rc = VINF_SUCCESS;
    810819
    811820    LogFlowFunc(("returns %Rrc *pcEntriesUsed=%u\n", rc, cEntries));
Note: See TracChangeset for help on using the changeset viewer.

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