Received: from eggs.gnu.org ([2001:4830:134:3::10]:54138) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zn5UK-0008AI-Ao for qemu-devel@nongnu.org; Fri, 16 Oct 2015 09:56:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zn5UH-0007kv-1p for qemu-devel@nongnu.org; Fri, 16 Oct 2015 09:56:04 -0400 Received: from mail-qg0-x22e.google.com ([2607:f8b0:400d:c04::22e]:33181) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zn5UG-0007ke-BT for qemu-devel@nongnu.org; Fri, 16 Oct 2015 09:56:00 -0400 Received: by qgeo38 with SMTP id o38so55973388qge.0 for ; Fri, 16 Oct 2015 06:56:00 -0700 (PDT) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Programmingkid In-Reply-To: Date: Fri, 16 Oct 2015 09:55:56 -0400 Content-Transfer-Encoding: quoted-printable Message-Id: <131F44C6-3C3A-451E-9980-E20FC9DA60E0@gmail.com> References: <20151016120711.GD10205@stefanha-thinkpad.redhat.com> Subject: Re: [Qemu-devel] Determining if USB is available List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Stefan Hajnoczi , Gerd Hoffmann , qemu-devel qemu-devel On Oct 16, 2015, at 8:48 AM, Peter Maydell wrote: > On 16 October 2015 at 13:07, Stefan Hajnoczi = wrote: >> On Thu, Sep 17, 2015 at 09:45:44PM -0400, Programmingkid wrote: >>> Would you know of a function that could indicate if USB is available = on the current emulator? >>=20 >> vl.c:usb_enabled()? >=20 > Haven't checked, but a quick look at the code suggests that may > not give the correct answer if the USB is provided by an emulated > PCI USB card? It is ok. I have solved this problem by I think checking for a USB bus.=20=