qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 02/12] qapi-schema: add 'device_add'


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH 02/12] qapi-schema: add 'device_add'
Date: Thu, 23 Jun 2016 21:52:30 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0

On 06/22/2016 06:07 PM, address@hidden wrote:
> From: Marc-André Lureau <address@hidden>
> 
> Even though device_add is not fully qapi'fied, we may add it to the json
> schema with 'gen': false, so registration and documentation can be
> generated.
> 
> Signed-off-by: Marc-André Lureau <address@hidden>
> ---
>  qapi-schema.json | 26 ++++++++++++++++++++++++++
>  1 file changed, 26 insertions(+)
> 
> diff --git a/qapi-schema.json b/qapi-schema.json
> index 73f0b6f..929f84e 100644
> --- a/qapi-schema.json
> +++ b/qapi-schema.json
> @@ -2188,6 +2188,32 @@
>  ##
>  { 'command': 'xen-set-global-dirty-log', 'data': { 'enable': 'bool' } }
>  
> +##
> +# @device_add:
> +#
> +# @driver: the name of the new device's driver
> +# @bus: #optional the device's parent bus (device tree path)
> +# @id: the device's ID, must be unique
> +# @props: #optional a dictionary of properties to be passed to the backend
> +#
> +# Add a device.
> +#
> +# Notes:
> +# 1. For detailed information about this command, please refer to the
> +#    'docs/qdev-device-use.txt' file.
> +#
> +# 2. It's possible to list device properties by running QEMU with the
> +#    "-device DEVICE,\?" command-line argument, where DEVICE is the device's 
> name

I'd prefer mentioning -device DEVICE,help, rather than a shell
metacharacter, so that the advice doesn't break in the presence of an
oddly-named file in the current directory when the user forgets to quote
things in the shell.

Long line; please keep under 80 columns.

> +#
> +# Example:
> +#
> +# -> { "execute": "device_add", "arguments": { "driver": "e1000", "id": 
> "net1" } }
> +# <- { "return": {} }
> +#
> +##

Missing a Since: designation; probably 0.13, since we've had it (and it
has been non-introspectible) since that point.

> +{ 'command': 'device_add',
> +  'data': {'driver': 'str', 'id': 'str'}, 'gen': false }
> +
>  ##
>  # @device_del:
>  #
> 

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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