From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=35541 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PFvSF-0008OO-8t for qemu-devel@nongnu.org; Tue, 09 Nov 2010 16:10:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PFvSA-0008JM-Mr for qemu-devel@nongnu.org; Tue, 09 Nov 2010 16:10:11 -0500 Received: from lo.gmane.org ([80.91.229.12]:37778) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PFvSA-0008I5-Cx for qemu-devel@nongnu.org; Tue, 09 Nov 2010 16:10:06 -0500 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1PFvS7-0003Ib-Se for qemu-devel@nongnu.org; Tue, 09 Nov 2010 22:10:03 +0100 Received: from ppp109-252-44-108.pppoe.spdop.ru ([109.252.44.108]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 09 Nov 2010 22:10:03 +0100 Received: from yumkam by ppp109-252-44-108.pppoe.spdop.ru with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 09 Nov 2010 22:10:03 +0100 From: Yuriy Kaminskiy Date: Tue, 09 Nov 2010 23:43:55 +0300 Message-ID: References: <1289233570-6529-1-git-send-email-hdegoede@redhat.com> <1289233570-6529-2-git-send-email-hdegoede@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: 7bit In-Reply-To: <1289233570-6529-2-git-send-email-hdegoede@redhat.com> Subject: [Qemu-devel] Re: [PATCH 1/3] usb-linux: Store devpath into USBHostDevice when usb_fs_type == USB_FS_SYS List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: spice-devel@lists.freedesktop.org Hans de Goede wrote: > This allows us to recreate the sysfspath used during scanning later > (which will be used in a later patch in this series). > --- > usb-linux.c | 29 +++++++++++++++++++---------- > 1 files changed, 19 insertions(+), 10 deletions(-) > > diff --git a/usb-linux.c b/usb-linux.c > index c3c38ec..61e8ec6 100644 > --- a/usb-linux.c > +++ b/usb-linux.c [...] > @@ -1300,6 +1302,13 @@ static int usb_host_scan_sys(void *opaque, USBScanFunc *func) > if (sscanf(line, "%d", &addr) != 1) { > goto the_end; > } > + if (!usb_host_read_file(line, sizeof(line), "devpath", > + de->d_name)) { > + goto the_end; > + } FYI: "devpath" attribute was introduced in 2.6.33 kernel.