From nobody Fri May 3 06:45:36 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zoho.com; dkim=fail spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1495180177351323.2433422008586; Fri, 19 May 2017 00:49:37 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id BEEAC68105; Fri, 19 May 2017 07:49:35 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 90FE6189EF; Fri, 19 May 2017 07:49:35 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 0DBCF180BAF5; Fri, 19 May 2017 07:49:35 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v4J7n8gI004901 for ; Fri, 19 May 2017 03:49:08 -0400 Received: by smtp.corp.redhat.com (Postfix) id 2CF3E18213; Fri, 19 May 2017 07:49:08 +0000 (UTC) Received: from mx1.redhat.com (ext-mx06.extmail.prod.ext.phx2.redhat.com [10.5.110.30]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 26C715DD70 for ; Fri, 19 May 2017 07:49:06 +0000 (UTC) Received: from m15-111.126.com (m15-111.126.com [220.181.15.111]) by mx1.redhat.com (Postfix) with ESMTP id 91E8D3D958 for ; Fri, 19 May 2017 07:49:04 +0000 (UTC) Received: from localhost.localdomain.localdomain (unknown [58.213.111.46]) by smtp1 (Coremail) with SMTP id C8mowACXc+U8nB5ZLfkhGw--.16782S2; Fri, 19 May 2017 15:18:28 +0800 (CST) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com BEEAC68105 Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; dmarc=fail (p=none dis=none) header.from=126.com Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=libvir-list-bounces@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com BEEAC68105 Authentication-Results: mx1.redhat.com; dkim=fail reason="signature verification failed" (1024-bit key) header.d=126.com header.i=@126.com header.b="IgVX+qfn" DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 91E8D3D958 Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; dmarc=pass (p=none dis=none) header.from=126.com Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=chen_han_xiao@126.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 91E8D3D958 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=126.com; s=s110527; h=From:Subject:Date:Message-Id; bh=tTaFjLGmhaAjWKP52v YY5rzwxSZAz25N69XHT9HZOYA=; b=IgVX+qfnug+t79VpvdAjoHfadmevR6Ulub d3BhfCzlyoat2YVdOG5JRAyMKtkOof4LaLF9tp2qFQbjX1SsTIjYXcUm/AIqLE1n 1wc91BIGDu0oAPR+K1gOuIVW7wj3TFJXLqD92eAJkinVYNFgZkohTgXsXf0JXiCr hmfsEfnc4= From: Chen Hanxiao To: libvir-list@redhat.com Date: Fri, 19 May 2017 15:17:32 +0800 Message-Id: <1495178252-10980-1-git-send-email-chen_han_xiao@126.com> X-CM-TRANSID: C8mowACXc+U8nB5ZLfkhGw--.16782S2 X-Coremail-Antispam: 1Uf129KBjvJXoW7uFWDGw1DZFykWF1xJr1DZFb_yoW8XFyxpF yYyFZ2yr4Sqr45Jryq93yfGF1xAw48GayrG393u34Skrn3AF4FqrW2vryrXa92yF1rAa18 A3s8Gr1rZryrJaDanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x07j0XdUUUUUU= X-Originating-IP: [58.213.111.46] X-CM-SenderInfo: xfkh0spkdqs5xldrqiyswou0bp/1tbikQTcrlP7KzFvXAAAsm X-Greylist: Delayed for 00:30:34 by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Fri, 19 May 2017 07:49:05 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Fri, 19 May 2017 07:49:05 +0000 (UTC) for IP:'220.181.15.111' DOMAIN:'m15-111.126.com' HELO:'m15-111.126.com' FROM:'chen_han_xiao@126.com' RCPT:'' X-RedHat-Spam-Score: 2.799 ** (BAYES_50, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_PSBL, RP_MATCHES_RCVD, SPF_PASS) 220.181.15.111 m15-111.126.com 220.181.15.111 m15-111.126.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.30 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Cc: Chen Hanxiao Subject: [libvirt] [PATCH] usb: keep leading zeros of vendor/product id in USB device X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Fri, 19 May 2017 07:49:36 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" From: Chen Hanxiao Some vendor id or product id may have leading zeros. We should show them. Signed-off-by: Chen Hanxiao Reviewed-by: Laine Stump --- src/util/virusb.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/util/virusb.c b/src/util/virusb.c index 8cd2f57..6359235 100644 --- a/src/util/virusb.c +++ b/src/util/virusb.c @@ -221,7 +221,7 @@ virUSBDeviceFindByVendor(unsigned int vendor, if (list->count =3D=3D 0) { virObjectUnref(list); if (!mandatory) { - VIR_DEBUG("Did not find USB device %x:%x", + VIR_DEBUG("Did not find USB device %04x:%04x", vendor, product); if (devices) *devices =3D NULL; @@ -229,7 +229,7 @@ virUSBDeviceFindByVendor(unsigned int vendor, } =20 virReportError(VIR_ERR_INTERNAL_ERROR, - _("Did not find USB device %x:%x"), vendor, product= ); + _("Did not find USB device %04x:%04x"), vendor, pro= duct); return -1; } =20 @@ -300,7 +300,7 @@ virUSBDeviceFind(unsigned int vendor, if (list->count =3D=3D 0) { virObjectUnref(list); if (!mandatory) { - VIR_DEBUG("Did not find USB device %x:%x bus:%u device:%u", + VIR_DEBUG("Did not find USB device %04x:%04x bus:%u device:%u", vendor, product, bus, devno); if (usb) *usb =3D NULL; @@ -308,7 +308,7 @@ virUSBDeviceFind(unsigned int vendor, } =20 virReportError(VIR_ERR_INTERNAL_ERROR, - _("Did not find USB device %x:%x bus:%u device:%u"), + _("Did not find USB device %04x:%04x bus:%u device:= %u"), vendor, product, bus, devno); return -1; } --=20 2.7.4 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list