tstHostHardwareLinux.cpp revision dff7b61dd3fdc4026a02236298516db1d8ac6516
/* $Id$ */
/** @file
*
* Test executable for quickly excercising/debugging the Linux host hardware
* bits.
*/
/*
* Copyright (C) 2008 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
* General Public License (GPL) as published by the Free Software
* Foundation, in version 2 as it comes in the "COPYING" file of the
* VirtualBox OSE distribution. VirtualBox OSE is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
*/
#include <HostHardwareLinux.h>
#include <USBGetDevices.h>
#include <iprt/initterm.h>
#include <errno.h>
#include <string.h>
#include <stdlib.h>
{
int rc;
while (true)
{
break;
if (RT_FAILURE(rc))
{
RTPrintf("Failed!\n");
exit(1);
}
if (RT_SUCCESS(rc))
break;
}
return rc;
}
const char *pcszDevices,
const char *pcszMethod)
{
while (pDevice)
{
RTPrintf(" Manufacturer: %s, product: %s, serial number string: %s\n",
}
}
{
while (pDevice)
{
}
}
int main()
{
RTR3Init();
int rc = VINF_SUCCESS;
if (RT_SUCCESS(rc))
if (RT_FAILURE(rc))
{
RTPrintf("Failed to update the host drive information, error %Rrc\n",
rc);
return 1;
}
RTPrintf ("Listing floppy drives detected:\n");
{
RTPrintf ("\n");
}
RTPrintf ("Listing DVD drives detected:\n");
{
RTPrintf ("\n");
}
{
false);
}
#ifdef VBOX_USB_WITH_SYSFS
pcLocation = USBProxyLinuxGetDeviceRoot(true);
{
true);
}
RTPrintf ("Waiting for a hotplug event for five seconds...\n");
RTPrintf ("Waiting for a hotplug event, Ctrl-C to abort...\n");
RTPrintf ("Testing interrupting a hotplug event...\n");
#endif /* VBOX_USB_WITH_SYSFS */
return 0;
}