OSDN Git Service

qapi: improve device_add schema
authorMarc-André Lureau <marcandre.lureau@redhat.com>
Fri, 13 Jan 2017 14:41:18 +0000 (15:41 +0100)
committerMarkus Armbruster <armbru@redhat.com>
Mon, 16 Jan 2017 08:15:24 +0000 (09:15 +0100)
'device_add' is still incomplete for now, but we can fix a few
arguments:
- 'bus' is a common argument, regardless of the device
- 'id' is an optional argument

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20170113144135.5150-5-marcandre.lureau@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
qapi-schema.json

index 0a3057e..863abc4 100644 (file)
 #
 # @bus: #optional the device's parent bus (device tree path)
 #
-# @id: the device's ID, must be unique
+# @id: #optional the device's ID, must be unique
 #
 # Additional arguments depend on the type.
 #
 # Since: 0.13
 ##
 { 'command': 'device_add',
-  'data': {'driver': 'str', 'id': 'str'},
+  'data': {'driver': 'str', '*bus': 'str', '*id': 'str'},
   'gen': false } # so we can get the additional arguments
 
 ##