On Wed, Jan 08, 2014 at 08:36:06AM +0100, Markus Armbruster wrote: > Hani Benhabiles <kroo...@gmail.com> writes: > > > This would allow a user to be able to refer to the device when using > > commands > > like device_del. > > > > Signed-off-by: Hani Benhabiles <kroo...@gmail.com> > > No. > > Device IDs belong to the user. Any IDs the system picks automatically > can collide with the user's IDs. > > Management applications assume that they can pick any ID they want. > Your patch can introduce ID collisions, and thus make existing > configurations fail. >
How can it lead to ID collisions ? For this reason, the loop in assign_device_name() specifically check that the ID doesn't exist already and uses the next value if it does. How would something like: (qemu) device_add virtio-net-pci ==> ID: virtio-net-pci.0 Be more problematic than: (qemu) device_add virtio-net-pci,id=virtio-net-pci.0 > If I remember correctly, a few legacy convenience options pick IDs for > historical reasons. If you use them, you need to be aware of the IDs > they pick. Management applications shouldn't use them. > > We've discussed this a couple of times already, by the way.