From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52890) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bhbSb-0003az-8k for qemu-devel@nongnu.org; Wed, 07 Sep 2016 07:56:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bhbSV-0004zL-CA for qemu-devel@nongnu.org; Wed, 07 Sep 2016 07:56:08 -0400 Received: from mx1.redhat.com ([209.132.183.28]:39838) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bhbSV-0004zH-6h for qemu-devel@nongnu.org; Wed, 07 Sep 2016 07:56:03 -0400 Message-ID: <1473249360.28663.75.camel@redhat.com> From: Gerd Hoffmann Date: Wed, 07 Sep 2016 13:56:00 +0200 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH v3 2/2] usb-mtp: added object properties List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Isaac Lozano <109lozanoi@gmail.com> Cc: qemu-devel@nongnu.org, bsd@redhat.com Hi, > and object properties. Most object properties are data that we already > have, except for the unique persistant object identifier. Windows > + case PROP_PERSISTENT_UNIQUE_OBJECT_IDENTIFIER: > + /* Should be persistant between sessions, > + * but using our objedt ID is "good enough" > + * for now */ > + usb_mtp_add_u64(d, 0x0000000000000000); > + usb_mtp_add_u64(d, o->handle); > + break; Didn't I mention for an older version already that the inode number would be a better fit? The inode number is persistent and unique per filesystem. While being at it we might also add the device id, to handle the (unlikely) case that the mtp device spans multiple filesystems. We stat() the file already and cache the result, so this is as simple as using o->stat.st_{dev,ino}. See "man 2 stat" for details. Other than that the patch series looks fine. Sorry for the delay. Now that vacation time, kvm forum and qemu 2.7 freeze are over things should go faster for v4. cheers, Gerd