From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:38433) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QozZs-0005zf-Id for qemu-devel@nongnu.org; Thu, 04 Aug 2011 11:11:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QozZO-0007rX-IS for qemu-devel@nongnu.org; Thu, 04 Aug 2011 11:11:11 -0400 Received: from mx1.redhat.com ([209.132.183.28]:63762) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QozZO-0007p5-BO for qemu-devel@nongnu.org; Thu, 04 Aug 2011 11:10:46 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p74FAUhl014014 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 4 Aug 2011 11:10:30 -0400 From: Gerd Hoffmann Date: Thu, 4 Aug 2011 17:10:11 +0200 Message-Id: <1312470626-25872-2-git-send-email-kraxel@redhat.com> In-Reply-To: <1312470626-25872-1-git-send-email-kraxel@redhat.com> References: <1312470626-25872-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PATCH 01/16] re-activate usb-host for bsd List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Gerd Hoffmann A bunch of code was disabled via #if 0, for a quite long time (since Sept 2009). Surprisingly the code builds just fine when they are removed (tested on OpenBSD). /me wonders nevertheless whenever there are any users of those bits when this went unnoticed for almost two years ... Signed-off-by: Gerd Hoffmann --- usb-bsd.c | 10 ++-------- 1 files changed, 2 insertions(+), 8 deletions(-) diff --git a/usb-bsd.c b/usb-bsd.c index 3b97eb4..ab8e3b7 100644 --- a/usb-bsd.c +++ b/usb-bsd.c @@ -62,7 +62,6 @@ typedef struct USBHostDevice { } USBHostDevice; -#if 0 static int ensure_ep_open(USBHostDevice *dev, int ep, int mode) { char buf[32]; @@ -110,7 +109,6 @@ static void ensure_eps_closed(USBHostDevice *dev) epnum++; } } -#endif static void usb_host_handle_reset(USBDevice *dev) { @@ -119,7 +117,6 @@ static void usb_host_handle_reset(USBDevice *dev) #endif } -#if 0 /* XXX: * -check device states against transfer requests * and return appropriate response @@ -278,7 +275,6 @@ static int usb_host_handle_data(USBDevice *dev, USBPacket *p) return ret; } } -#endif static void usb_host_handle_destroy(USBDevice *opaque) { @@ -305,8 +301,8 @@ static int usb_host_initfn(USBDevice *dev) USBDevice *usb_host_device_open(const char *devname) { struct usb_device_info bus_info, dev_info; - USBDevice *d = NULL; - USBHostDevice *dev, *ret = NULL; + USBDevice *d = NULL, *ret = NULL; + USBHostDevice *dev; char ctlpath[PATH_MAX + 1]; char buspath[PATH_MAX + 1]; int bfd, dfd, bus, address, i; @@ -408,10 +404,8 @@ static struct USBDeviceInfo usb_host_dev_info = { .init = usb_host_initfn, .handle_packet = usb_generic_handle_packet, .handle_reset = usb_host_handle_reset, -#if 0 .handle_control = usb_host_handle_control, .handle_data = usb_host_handle_data, -#endif .handle_destroy = usb_host_handle_destroy, }; -- 1.7.1