qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v3 2/2] usb-mtp: added object properties


From: Gerd Hoffmann
Subject: Re: [Qemu-devel] [PATCH v3 2/2] usb-mtp: added object properties
Date: Wed, 07 Sep 2016 13:56:00 +0200

  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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]