VirtualBox

Ignore:
Timestamp:
Dec 4, 2008 3:17:33 PM (16 years ago)
Author:
vboxsync
Message:

Main: rework the Linux host drive code to use libdbus-1 directly instead of libhal

File:
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/testcase/tstHostHardwareLinux.cpp

    r14933 r14991  
    1414 */
    1515
    16 #include "tstUSBLinux.h"
     16#ifdef VBOX_USB_WITH_SYSFS
     17# include "tstUSBLinux.h"
     18#endif
     19
     20#include <HostHardwareLinux.h>
    1721
    1822#include <VBox/err.h>
     
    2731{
    2832    RTR3Init();
     33#ifdef VBOX_USB_WITH_SYSFS
    2934    USBProxyServiceLinux service;
    3035    service.initSysfs();
     
    7479        }
    7580    }
     81#endif  /* VBOX_USB_WITH_SYSFS */
     82    VBoxMainDriveInfo driveInfo;
     83    g_testHostHardwareLinux = true;
     84    int rc = driveInfo.updateFloppies();
     85    if (RT_SUCCESS (rc))
     86        rc = driveInfo.updateDVDs();
     87    if (RT_FAILURE (rc))
     88    {
     89        RTPrintf("Failed to update the host drive information, error %Rrc\n",
     90                 rc);
     91        return 1;
     92    }
     93    RTPrintf ("Listing floppy drives detected:\n");
     94    for (VBoxMainDriveInfo::DriveInfoList::const_iterator it = driveInfo.FloppyBegin();
     95         it != driveInfo.FloppyEnd(); ++it)
     96    {
     97        RTPrintf ("  device: %s", it->mDevice.c_str());
     98        if (!it->mUdi.empty())
     99            RTPrintf (", udi: %s", it->mUdi.c_str());
     100        if (!it->mDescription.empty())
     101            RTPrintf (", description: %s", it->mDescription.c_str());
     102        RTPrintf ("\n");
     103    }
     104    RTPrintf ("Listing DVD drives detected:\n");
     105    for (VBoxMainDriveInfo::DriveInfoList::const_iterator it = driveInfo.DVDBegin();
     106         it != driveInfo.DVDEnd(); ++it)
     107    {
     108        RTPrintf ("  device: %s", it->mDevice.c_str());
     109        if (!it->mUdi.empty())
     110            RTPrintf (", udi: %s", it->mUdi.c_str());
     111        if (!it->mDescription.empty())
     112            RTPrintf (", description: %s", it->mDescription.c_str());
     113        RTPrintf ("\n");
     114    }
    76115    return 0;
    77116}
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