VirtualBox

Changeset 23537 in vbox for trunk/src/VBox/Main


Ignore:
Timestamp:
Oct 4, 2009 2:21:08 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
53180
Message:

FreeBSD: Bye bye HAL. We use the CAM layer directly to discover CD/DVD devices now

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

Legend:

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

    r23529 r23537  
    3232#include "HostPower.h"
    3333
    34 #ifdef RT_OS_LINUX
     34#if defined(RT_OS_LINUX) || defined(RT_OS_FREEBSD)
    3535# include <HostHardwareLinux.h>
    3636#endif
     
    9494#endif /* RT_OS_WINDOWS */
    9595
    96 #ifdef RT_OS_FREEBSD
    97 # ifdef VBOX_USE_LIBHAL
    98 #  include "vbox-libhal.h"
    99 # endif
    100 #endif
    101 
    10296#include "HostImpl.h"
    10397#include "HostNetworkInterfaceImpl.h"
     
    168162#endif /* VBOX_WITH_USB */
    169163
    170 #ifdef RT_OS_LINUX
     164#if defined(RT_OS_LINUX) || defined(RT_OS_FREEBSD)
    171165    /** Object with information about host drives */
    172166    VBoxMainDriveInfo       hostDrives;
     
    445439        }
    446440
    447 #elif defined(RT_OS_LINUX)
     441#elif defined(RT_OS_LINUX) || defined(RT_OS_FREEBSD)
    448442        if (RT_SUCCESS(m->hostDrives.updateDVDs()))
    449443            for (DriveInfoList::const_iterator it = m->hostDrives.DVDBegin();
     
    473467            cur = cur->pNext;
    474468            RTMemFree(freeMe);
    475         }
    476 #elif defined(RT_OS_FREEBSD)
    477 # ifdef VBOX_USE_LIBHAL
    478         if (!getDVDInfoFromHal(list))
    479 # endif
    480         {
    481             /** @todo: Scan for accessible /dev/cd* devices. */
    482469        }
    483470#else
     
    17791766////////////////////////////////////////////////////////////////////////////////
    17801767
    1781 #if (defined(RT_OS_SOLARIS) || defined(RT_OS_FREEBSD)) && defined(VBOX_USE_LIBHAL)
    1782 /* Solaris and FreeBSD hosts, loading libhal at runtime */
     1768#if defined(RT_OS_SOLARIS) && defined(VBOX_USE_LIBHAL)
     1769/* Solaris hosts, loading libhal at runtime */
    17831770
    17841771/**
     
    18241811                            gLibHalFreeString(devNode);
    18251812                            devNode = tmp;
    1826 #endif
    1827 
    1828 #ifdef RT_OS_FREEBSD
    1829                             /*
    1830                              * Don't show devices handled by the 'acd' driver.
    1831                              * The ioctls don't work with it.
    1832                              */
    1833                             char *driverName = gLibHalDeviceGetPropertyString(halContext,
    1834                                                        halDevices[i], "freebsd.driver", &dbusError);
    1835                             if (driverName)
    1836                             {
    1837                                 if (RTStrCmp(driverName, "acd") == 0)
    1838                                 {
    1839                                     gLibHalFreeString(devNode);
    1840                                     devNode = NULL;
    1841                                 }
    1842                                 gLibHalFreeString(driverName);
    1843                             }
    18441813#endif
    18451814
  • trunk/src/VBox/Main/Makefile.kmk

    r23529 r23537  
    345345
    346346VBoxSVC_SOURCES.freebsd = \
    347         linux/vbox-libhal.cpp
     347        freebsd/HostHardwareFreeBSD.cpp
    348348
    349349ifdef VBOX_WITH_USB
  • trunk/src/VBox/Main/include/HostImpl.h

    r23341 r23537  
    123123private:
    124124
    125 #if (defined(RT_OS_SOLARIS) || defined(RT_OS_FREEBSD)) && defined(VBOX_USE_LIBHAL)
     125#if defined(RT_OS_SOLARIS) && defined(VBOX_USE_LIBHAL)
    126126    bool getDVDInfoFromHal(std::list< ComObjPtr<Medium> > &list);
    127127    bool getFloppyInfoFromHal(std::list< ComObjPtr<Medium> > &list);
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