Re: [Qemu-devel] [PATCH] qdev: Assign a default device ID when none is provided.

2014-01-10 Thread Markus Armbruster
Andreas Färber writes: > Am 10.01.2014 10:09, schrieb Markus Armbruster: >> Commands taking a device ID could be extended to take a path in the QOM >> graph instead of an ID. >> >> In the human monitor, it could perhaps work like this: >> >> IDs consist of letters, digits, '-', '.', '_', st

Re: [Qemu-devel] [PATCH] qdev: Assign a default device ID when none is provided.

2014-01-10 Thread Andreas Färber
Am 10.01.2014 10:09, schrieb Markus Armbruster: > Commands taking a device ID could be extended to take a path in the QOM > graph instead of an ID. > > In the human monitor, it could perhaps work like this: > > IDs consist of letters, digits, '-', '.', '_', starting with a > letter (see i

Re: [Qemu-devel] [PATCH] qdev: Assign a default device ID when none is provided.

2014-01-10 Thread Markus Armbruster
Paolo Bonzini writes: > Il 09/01/2014 19:18, Hani Benhabiles ha scritto: >> On Wed, Jan 08, 2014 at 06:34:01PM +0100, Paolo Bonzini wrote: >>> Il 08/01/2014 18:17, Hani Benhabiles ha scritto: For this reason, the loop in assign_device_name() specifically check that the ID doesn't e

Re: [Qemu-devel] [PATCH] qdev: Assign a default device ID when none is provided.

2014-01-09 Thread Paolo Bonzini
Il 09/01/2014 19:18, Hani Benhabiles ha scritto: > On Wed, Jan 08, 2014 at 06:34:01PM +0100, Paolo Bonzini wrote: >> Il 08/01/2014 18:17, Hani Benhabiles ha scritto: >>> For this reason, the loop in assign_device_name() specifically check that >>> the ID >>> doesn't exist already and uses the next

Re: [Qemu-devel] [PATCH] qdev: Assign a default device ID when none is provided.

2014-01-09 Thread Hani Benhabiles
On Wed, Jan 08, 2014 at 06:34:01PM +0100, Paolo Bonzini wrote: > Il 08/01/2014 18:17, Hani Benhabiles ha scritto: > > 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

Re: [Qemu-devel] [PATCH] qdev: Assign a default device ID when none is provided.

2014-01-08 Thread Paolo Bonzini
Il 08/01/2014 18:17, Hani Benhabiles ha scritto: > 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 mor

Re: [Qemu-devel] [PATCH] qdev: Assign a default device ID when none is provided.

2014-01-08 Thread Hani Benhabiles
On Wed, Jan 08, 2014 at 08:36:06AM +0100, Markus Armbruster wrote: > Hani Benhabiles 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 > > No. > > Device IDs belong to the user. Any IDs

Re: [Qemu-devel] [PATCH] qdev: Assign a default device ID when none is provided.

2014-01-07 Thread Markus Armbruster
Hani Benhabiles 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 No. Device IDs belong to the user. Any IDs the system picks automatically can collide with the user's IDs. Management applications ass

[Qemu-devel] [PATCH] qdev: Assign a default device ID when none is provided.

2014-01-07 Thread Hani Benhabiles
This would allow a user to be able to refer to the device when using commands like device_del. Signed-off-by: Hani Benhabiles --- qdev-monitor.c | 64 +- 1 file changed, 50 insertions(+), 14 deletions(-) diff --git a/qdev-monitor.c b/qdev-