VirtualBox

Changeset 5546 in vbox


Ignore:
Timestamp:
Oct 29, 2007 11:16:02 AM (17 years ago)
Author:
vboxsync
Message:

Host DVD (Linux hosts): load libhal using the correct name

Location:
trunk/src/VBox/Main
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/include/vbox-libhal.h

    r5368 r5546  
    2222#include <stdint.h>
    2323
    24 #define LIB_DBUS "libdbus-1"
    25 #define LIB_HAL "libhal"
     24#define LIB_HAL "libhal.so.1"
    2625
    2726/** Types from the dbus and hal header files which we need.  These are taken more or less
  • trunk/src/VBox/Main/linux/vbox-libhal.cpp

    r5368 r5546  
    2929static bool gCheckedForLibHal = false;
    3030/**
    31  * Pointer to the libdbus shared object.  This should only be set once all needed libraries
    32  * and symbols have been successfully loaded.
    33  */
    34 static RTLDRMOD ghLibDBus = 0;
    35 /**
    3631 * Pointer to the libhal shared object.  This should only be set once all needed libraries
    3732 * and symbols have been successfully loaded.
     
    5752bool gLibHalCheckPresence(void)
    5853{
    59     RTLDRMOD hLibDBus;
    6054    RTLDRMOD hLibHal;
    6155
    62     if (ghLibDBus != 0 && ghLibHal != 0 && gCheckedForLibHal == true)
     56    if (ghLibHal != 0 && gCheckedForLibHal == true)
    6357        return true;
    6458    if (gCheckedForLibHal == true)
    6559        return false;
    66     if (!RT_SUCCESS(RTLdrLoad(LIB_DBUS, &hLibDBus)))
    67         return false;
    6860    if (!RT_SUCCESS(RTLdrLoad(LIB_HAL, &hLibHal)))
    6961    {
    70         RTLdrClose(hLibDBus);
    7162        return false;
    7263    }
    73     if (   RT_SUCCESS(RTLdrGetSymbol(hLibDBus, "dbus_error_init", (void **) &gDBusErrorInit))
    74         && RT_SUCCESS(RTLdrGetSymbol(hLibDBus, "dbus_bus_get", (void **) &gDBusBusGet))
    75         && RT_SUCCESS(RTLdrGetSymbol(hLibDBus, "dbus_error_free", (void **) &gDBusErrorFree))
    76         && RT_SUCCESS(RTLdrGetSymbol(hLibDBus, "dbus_connection_unref",
     64    if (   RT_SUCCESS(RTLdrGetSymbol(hLibHal, "dbus_error_init", (void **) &gDBusErrorInit))
     65        && RT_SUCCESS(RTLdrGetSymbol(hLibHal, "dbus_bus_get", (void **) &gDBusBusGet))
     66        && RT_SUCCESS(RTLdrGetSymbol(hLibHal, "dbus_error_free", (void **) &gDBusErrorFree))
     67        && RT_SUCCESS(RTLdrGetSymbol(hLibHal, "dbus_connection_unref",
    7768                                     (void **) &gDBusConnectionUnref))
    7869        && RT_SUCCESS(RTLdrGetSymbol(hLibHal, "libhal_ctx_new", (void **) &gLibHalCtxNew))
     
    9182       )
    9283    {
    93         ghLibDBus = hLibDBus;
    9484        ghLibHal = hLibHal;
    9585        gCheckedForLibHal = true;
     
    9888    else
    9989    {
    100         RTLdrClose(hLibDBus);
    10190        RTLdrClose(hLibHal);
    10291        gCheckedForLibHal = true;
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