diff options
author | blueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162> | 2009-03-07 20:06:23 +0000 |
---|---|---|
committer | blueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162> | 2009-03-07 20:06:23 +0000 |
commit | c5e97233e8c8e53aab1b80b5e9891a71c4edea3e (patch) | |
tree | 6bf1eb8605f56e1f1647df85e4351a24e763895f /usb-bsd.c | |
parent | 9399f095bd742ef8dc0f1b08baa3893d9bdbeebc (diff) |
Support for DragonFly BSD (Hasso Tepper)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6746 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'usb-bsd.c')
-rw-r--r-- | usb-bsd.c | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -34,7 +34,11 @@ #undef USB_SPEED_LOW #include <sys/ioctl.h> +#ifndef __DragonFly__ #include <dev/usb/usb.h> +#else +#include <bus/usb/usb.h> +#endif #include <signal.h> /* This value has maximum potential at 16. @@ -68,7 +72,7 @@ static int ensure_ep_open(USBHostDevice *dev, int ep, int mode) ep = UE_GET_ADDR(ep); if (dev->ep_fd[ep] < 0) { -#ifdef __FreeBSD__ +#if defined(__FreeBSD__) || defined(__DragonFly__) snprintf(buf, sizeof(buf) - 1, "%s.%d", dev->devpath, ep); #else snprintf(buf, sizeof(buf) - 1, "%s.%02d", dev->devpath, ep); @@ -321,7 +325,7 @@ USBDevice *usb_host_device_open(const char *devname) return NULL; } -#ifdef __FreeBSD__ +#if defined(__FreeBSD__) || defined(__DragonFly__) snprintf(ctlpath, PATH_MAX, "/dev/%s", bus_info.udi_devnames[0]); #else snprintf(ctlpath, PATH_MAX, "/dev/%s.00", bus_info.udi_devnames[0]); @@ -411,7 +415,7 @@ static int usb_host_scan(void *opaque, USBScanFunc *func) if (strncmp(bus_info.udi_devnames[0], "ugen", 4) != 0) continue; -#ifdef __FreeBSD__ +#if defined(__FreeBSD__) || defined(__DragonFly__) snprintf(devbuf, sizeof(devbuf) - 1, "/dev/%s", bus_info.udi_devnames[0]); #else snprintf(devbuf, sizeof(devbuf) - 1, "/dev/%s.00", bus_info.udi_devnames[0]); |