From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=35129 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PG6J8-0007C2-F8 for qemu-devel@nongnu.org; Wed, 10 Nov 2010 03:45:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PG6J6-0000tO-KD for qemu-devel@nongnu.org; Wed, 10 Nov 2010 03:45:30 -0500 Received: from mx1.redhat.com ([209.132.183.28]:45915) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PG6J6-0000rm-Ab for qemu-devel@nongnu.org; Wed, 10 Nov 2010 03:45:28 -0500 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id oAA8jOtD003333 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 10 Nov 2010 03:45:24 -0500 Received: from shalem.localdomain (vpn1-5-48.ams2.redhat.com [10.36.5.48]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id oAA8jLsu032728 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 10 Nov 2010 03:45:23 -0500 Message-ID: <4CDA5BDD.6060600@redhat.com> Date: Wed, 10 Nov 2010 09:46:21 +0100 From: Hans de Goede MIME-Version: 1.0 Subject: Re: [Qemu-devel] Re: [PATCH 1/3] usb-linux: Store devpath into USBHostDevice when usb_fs_type == USB_FS_SYS References: <1289233570-6529-1-git-send-email-hdegoede@redhat.com> <1289233570-6529-2-git-send-email-hdegoede@redhat.com> In-Reply-To: Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Hi, On 11/09/2010 09:43 PM, Yuriy Kaminskiy wrote: > 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. > Ah I did not know that, well the same information is available in de->d_name, and has been so for much longer. So I'll do a new version getting it from de->d_name instead. Thanks, Hans