From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Jackson Subject: Re: [PATCH V4 3/7] libxl: add pvusb API Date: Tue, 16 Jun 2015 17:32:14 +0100 Message-ID: <21888.20366.133089.128189@mariner.uk.xensource.com> References: <1433906441-3280-1-git-send-email-cyliu@suse.com> <1433906441-3280-4-git-send-email-cyliu@suse.com> <21887.64856.265751.921367@mariner.uk.xensource.com> <21888.1191.40486.530231@mariner.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: George Dunlap Cc: Wei Liu , Ian Campbell , Chunyan Liu , "xen-devel@lists.xen.org" , Jim Fehlig , Simon Cao List-Id: xen-devel@lists.xenproject.org I have just discovered that the value used in /dev/disk/by-path is not from sysfs, or at least, not directly. udev cobbles it together with a bunch of string mangling, from information mostly from sysfs. There is no corresponding thing for usb devices. So Linux, the kernel, does not actually provide a stable device name string. This is obviously absurd, but I think fixing it is out of scope. I suggest we provide a facility to allow a user to specify a fnmatch glob pattern to be applied to the sysfs path. That way when they see their device is /devices/pci0000:00/0000:00:1d.7/usb1/1-1 they can write /devices/pci0000:00/0000:00:1d.7/usb*/*-1 which will match exactly and only the right thing. Ian.