qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: Gerd Hoffmann <kraxel@redhat.com>
Subject: [Qemu-devel] [PATCH 4/4] usb-host: raise libusbx minimum version to 1.0.13
Date: Tue, 23 Apr 2013 10:32:09 +0200	[thread overview]
Message-ID: <1366705929-11251-5-git-send-email-kraxel@redhat.com> (raw)
In-Reply-To: <1366705929-11251-1-git-send-email-kraxel@redhat.com>

Allows to remove one FIXME.  Makes LIBUSB_LOG_LEVEL_WARNING build errors
go away.  And starting with that version libusb has a LIBUSBX_API_VERSION
define which allows to easily #ifdef version dependencies should that
need arrive in the future.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 configure            |    2 +-
 hw/usb/host-libusb.c |    5 -----
 2 files changed, 1 insertion(+), 6 deletions(-)

diff --git a/configure b/configure
index 51a6c56..33d3354 100755
--- a/configure
+++ b/configure
@@ -3060,7 +3060,7 @@ fi
 
 # check for libusb
 if test "$libusb" != "no" ; then
-    if $pkg_config libusb-1.0 >/dev/null 2>&1 ; then
+    if $pkg_config --atleast-version=1.0.13 libusb-1.0 >/dev/null 2>&1 ; then
         libusb="yes"
 	usb="libusb"
         libusb_cflags=$($pkg_config --cflags libusb-1.0 2>/dev/null)
diff --git a/hw/usb/host-libusb.c b/hw/usb/host-libusb.c
index 29f35b3..d1186b8 100644
--- a/hw/usb/host-libusb.c
+++ b/hw/usb/host-libusb.c
@@ -236,8 +236,6 @@ static int usb_host_init(void)
 
 static int usb_host_get_port(libusb_device *dev, char *port, size_t len)
 {
-#if defined(LIBUSBX_API_VERSION) && (LIBUSBX_API_VERSION >= 0x010000ff)
-    /* have libusb_get_port_path() */
     uint8_t path[7];
     size_t off;
     int rc, i;
@@ -251,9 +249,6 @@ static int usb_host_get_port(libusb_device *dev, char *port, size_t len)
         off += snprintf(port+off, len-off, ".%d", path[i]);
     }
     return off;
-#else
-    return snprintf(port, len, "FIXME");
-#endif
 }
 
 static void usb_host_libusb_error(const char *func, int rc)
-- 
1.7.9.7

  parent reply	other threads:[~2013-04-23  8:32 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-23  8:32 [Qemu-devel] [PULL 0/4] usb patch queue Gerd Hoffmann
2013-04-23  8:32 ` [Qemu-devel] [PATCH 1/4] xhci: remove XHCIRing->base (unused) Gerd Hoffmann
2013-04-23  8:32 ` [Qemu-devel] [PATCH 2/4] ehci_free_packet: Discard finished packets when the queue is halted Gerd Hoffmann
2013-04-23  8:32 ` [Qemu-devel] [PATCH 3/4] usb: better speed mismatch error reporting Gerd Hoffmann
2013-04-23  8:32 ` Gerd Hoffmann [this message]
  -- strict thread matches above, loose matches on Subject: below --
2013-05-02 20:21 [Qemu-devel] [PATCH 4/4] usb-host: raise libusbx minimum version to 1.0.13 Ed Maste
2013-05-03  6:09 ` Gerd Hoffmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1366705929-11251-5-git-send-email-kraxel@redhat.com \
    --to=kraxel@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).