VirtualBox

Changeset 5368 in vbox


Ignore:
Timestamp:
Oct 18, 2007 9:57:06 AM (18 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
25436
Message:

Attempt to fix libhal cdrom and floppy detection

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/HostImpl.cpp

    r5217 r5368  
    16051605                {
    16061606                    int numDevices;
    1607                     char **halDevices = gLibHalFindDeviceByCapability(halContext,
    1608                                                 "storage.cdrom", &numDevices, &dbusError);
     1607                    char **halDevices = gLibHalFindDeviceStringMatch(halContext,
     1608                                                "storage.drive_type", "cdrom",
     1609                                                &numDevices, &dbusError);
    16091610                    if (halDevices != 0)
    16101611                    {
     
    16241625                            if (devNode != 0)
    16251626                            {
    1626                                 if (validateDevice(devNode, true))
    1627                                 {
     1627//                                if (validateDevice(devNode, true))
     1628//                                {
    16281629                                    Utf8Str description;
    16291630                                    char *vendor, *product;
     
    16741675                                        gLibHalFreeString(product);
    16751676                                    }
    1676                                 }
    1677                                 else
    1678                                 {
    1679                                     LogRel(("Host::COMGETTER(DVDDrives): failed to validate the block device %s as a DVD drive\n"));
    1680                                 }
     1677//                                }
     1678//                                else
     1679//                                {
     1680//                                    LogRel(("Host::COMGETTER(DVDDrives): failed to validate the block device %s as a DVD drive\n"));
     1681//                                }
    16811682#ifndef RT_OS_SOLARIS
    16821683                                gLibHalFreeString(devNode);
     
    17571758                {
    17581759                    int numDevices;
    1759                     char **halDevices = gLibHalFindDeviceByCapability(halContext,
    1760                                                 "storage", &numDevices, &dbusError);
     1760                    char **halDevices = gLibHalFindDeviceStringMatch(halContext,
     1761                                                "storage.drive_type", "floppy",
     1762                                                &numDevices, &dbusError);
    17611763                    if (halDevices != 0)
    17621764                    {
     
    17871789                            if (devNode != 0)
    17881790                            {
    1789                                 if (validateDevice(devNode, false))
    1790                                 {
     1791//                                if (validateDevice(devNode, false))
     1792//                                {
    17911793                                    Utf8Str description;
    17921794                                    char *vendor, *product;
     
    18371839                                        gLibHalFreeString(product);
    18381840                                    }
    1839                                 }
    1840                                 else
    1841                                 {
    1842                                     LogRel(("Host::COMGETTER(FloppyDrives): failed to validate the block device %s as a floppy drive\n"));
    1843                                 }
     1841//                                }
     1842//                                else
     1843//                                {
     1844//                                    LogRel(("Host::COMGETTER(FloppyDrives): failed to validate the block device %s as a floppy drive\n"));
     1845//                                }
    18441846                                gLibHalFreeString(devNode);
    18451847                            }
  • trunk/src/VBox/Main/include/vbox-libhal.h

    r4071 r5368  
    5353extern dbus_bool_t (*gLibHalCtxSetDBusConnection)(LibHalContext *, DBusConnection *);
    5454extern dbus_bool_t (*gLibHalCtxInit)(LibHalContext *, DBusError *);
    55 extern char **(*gLibHalFindDeviceByCapability)(LibHalContext *, const char *, int *, DBusError *);
     55extern char **(*gLibHalFindDeviceStringMatch)(LibHalContext *, const char *, const char *, int *,
     56               DBusError *);
    5657extern char *(*gLibHalDeviceGetPropertyString)(LibHalContext *, const char *, const char *,
    5758                                              DBusError *);
  • trunk/src/VBox/Main/linux/vbox-libhal.cpp

    r4071 r5368  
    4747dbus_bool_t (*gLibHalCtxSetDBusConnection)(LibHalContext *, DBusConnection *);
    4848dbus_bool_t (*gLibHalCtxInit)(LibHalContext *, DBusError *);
    49 char **(*gLibHalFindDeviceByCapability)(LibHalContext *, const char *, int *, DBusError *);
     49char **(*gLibHalFindDeviceStringMatch)(LibHalContext *, const char *, const char *, int *,
     50        DBusError *);
    5051char *(*gLibHalDeviceGetPropertyString)(LibHalContext *, const char *, const char *, DBusError *);
    5152void (*gLibHalFreeString)(char *);
     
    7980                                     (void **) &gLibHalCtxSetDBusConnection))
    8081        && RT_SUCCESS(RTLdrGetSymbol(hLibHal, "libhal_ctx_init", (void **) &gLibHalCtxInit))
    81         && RT_SUCCESS(RTLdrGetSymbol(hLibHal, "libhal_find_device_by_capability",
    82                                      (void **) &gLibHalFindDeviceByCapability))
     82        && RT_SUCCESS(RTLdrGetSymbol(hLibHal, "libhal_manager_find_device_string_match",
     83                                     (void **) &gLibHalFindDeviceStringMatch))
    8384        && RT_SUCCESS(RTLdrGetSymbol(hLibHal, "libhal_device_get_property_string",
    8485                                     (void **) &gLibHalDeviceGetPropertyString))
Note: See TracChangeset for help on using the changeset viewer.

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