From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38103) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c6lhK-0004rY-SI for qemu-devel@nongnu.org; Tue, 15 Nov 2016 16:55:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c6lhG-0001RS-2F for qemu-devel@nongnu.org; Tue, 15 Nov 2016 16:55:22 -0500 Received: from mx1.redhat.com ([209.132.183.28]:60872) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1c6lhF-0001PU-Sw for qemu-devel@nongnu.org; Tue, 15 Nov 2016 16:55:17 -0500 From: Bandan Das References: <1473249360.28663.75.camel@redhat.com> Date: Tue, 15 Nov 2016 16:55:14 -0500 In-Reply-To: <1473249360.28663.75.camel@redhat.com> (Gerd Hoffmann's message of "Wed, 07 Sep 2016 13:56:00 +0200") Message-ID: MIME-Version: 1.0 Content-Type: text/plain 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: Gerd Hoffmann Cc: Isaac Lozano <109lozanoi@gmail.com>, qemu-devel@nongnu.org Gerd Hoffmann writes: > 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. Seems Isaac is busy with school and stuff. I will pick these up and post a follow up soon. Bandan > 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