Changeset 5546 in vbox
- Timestamp:
- Oct 29, 2007 11:16:02 AM (17 years ago)
- Location:
- trunk/src/VBox/Main
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/include/vbox-libhal.h
r5368 r5546 22 22 #include <stdint.h> 23 23 24 #define LIB_DBUS "libdbus-1" 25 #define LIB_HAL "libhal" 24 #define LIB_HAL "libhal.so.1" 26 25 27 26 /** 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 29 29 static bool gCheckedForLibHal = false; 30 30 /** 31 * Pointer to the libdbus shared object. This should only be set once all needed libraries32 * and symbols have been successfully loaded.33 */34 static RTLDRMOD ghLibDBus = 0;35 /**36 31 * Pointer to the libhal shared object. This should only be set once all needed libraries 37 32 * and symbols have been successfully loaded. … … 57 52 bool gLibHalCheckPresence(void) 58 53 { 59 RTLDRMOD hLibDBus;60 54 RTLDRMOD hLibHal; 61 55 62 if (ghLib DBus != 0 && ghLibHal != 0 && gCheckedForLibHal == true)56 if (ghLibHal != 0 && gCheckedForLibHal == true) 63 57 return true; 64 58 if (gCheckedForLibHal == true) 65 59 return false; 66 if (!RT_SUCCESS(RTLdrLoad(LIB_DBUS, &hLibDBus)))67 return false;68 60 if (!RT_SUCCESS(RTLdrLoad(LIB_HAL, &hLibHal))) 69 61 { 70 RTLdrClose(hLibDBus);71 62 return false; 72 63 } 73 if ( RT_SUCCESS(RTLdrGetSymbol(hLib DBus, "dbus_error_init", (void **) &gDBusErrorInit))74 && RT_SUCCESS(RTLdrGetSymbol(hLib DBus, "dbus_bus_get", (void **) &gDBusBusGet))75 && RT_SUCCESS(RTLdrGetSymbol(hLib DBus, "dbus_error_free", (void **) &gDBusErrorFree))76 && RT_SUCCESS(RTLdrGetSymbol(hLib DBus, "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", 77 68 (void **) &gDBusConnectionUnref)) 78 69 && RT_SUCCESS(RTLdrGetSymbol(hLibHal, "libhal_ctx_new", (void **) &gLibHalCtxNew)) … … 91 82 ) 92 83 { 93 ghLibDBus = hLibDBus;94 84 ghLibHal = hLibHal; 95 85 gCheckedForLibHal = true; … … 98 88 else 99 89 { 100 RTLdrClose(hLibDBus);101 90 RTLdrClose(hLibHal); 102 91 gCheckedForLibHal = true;
Note:
See TracChangeset
for help on using the changeset viewer.