Patchwork [v4] Man page: Add -global description

login
register
mail settings
Submitter Miroslav Rezanina
Date March 21, 2012, 12:46 p.m.
Message ID <20120321124654.GA1146@lws.brq.redhat.com>
Download mbox | patch
Permalink /patch/147976/
State New
Headers show

Comments

Miroslav Rezanina - March 21, 2012, 12:46 p.m.
There's only TODO information in qemu man page for -global option. This is a basic description of this option with simple example.

Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>

v4:
 - break long line 

v3:
 - add use case description
 - use prop instead of property

v2:
 - Use better value in example 
Patch:
--
Markus Armbruster - March 21, 2012, 5:05 p.m.
Miroslav Rezanina <mrezanin@redhat.com> writes:

> There's only TODO information in qemu man page for -global option. This is a basic description of this option with simple example.
>
> Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
>
> v4:
>  - break long line 
>
> v3:
>  - add use case description
>  - use prop instead of property
>
> v2:
>  - Use better value in example 
> Patch:
> --
> diff --git a/qemu-options.hx b/qemu-options.hx
> index daefce3..662f571 100644
> --- a/qemu-options.hx
> +++ b/qemu-options.hx
> @@ -288,13 +288,21 @@ TODO
>  ETEXI
>  
>  DEF("global", HAS_ARG, QEMU_OPTION_global,
> -    "-global driver.property=value\n"
> +    "-global driver.prop=value\n"
>      "                set a global default for a driver property\n",
>      QEMU_ARCH_ALL)
>  STEXI
> -@item -global
> +@item -global @var{driver}.@var{prop}=@var{value}
>  @findex -global
> -TODO
> +Set default value of @var{driver}'s property @var{prop} to @var{value}, e.g.:
> +
> +@example
> +qemu -global ide-drive.physical_block_size=4096 -drive file=file,if=ide,index=0,media=disk
> +@end example
> +
> +In particular, you can use this to set driver properties for devices which are 
> +created automatically by the machine model. To create a device which is not 
> +created automatically and set properties on it, use -@option{device}.
>  ETEXI
>  
>  DEF("mtdblock", HAS_ARG, QEMU_OPTION_mtdblock,

This is a clear improvement.  Cc'ing Anthony, the qdev maintainer in all
but name ;)
Anthony Liguori - March 26, 2012, 8:07 p.m.
On 03/21/2012 07:46 AM, Miroslav Rezanina wrote:
> There's only TODO information in qemu man page for -global option. This is a basic description of this option with simple example.
>
> Signed-off-by: Miroslav Rezanina<mrezanin@redhat.com>

Applied.  Thanks.

Regards,

Anthony Liguori

>
> v4:
>   - break long line
>
> v3:
>   - add use case description
>   - use prop instead of property
>
> v2:
>   - Use better value in example
> Patch:
> --
> diff --git a/qemu-options.hx b/qemu-options.hx
> index daefce3..662f571 100644
> --- a/qemu-options.hx
> +++ b/qemu-options.hx
> @@ -288,13 +288,21 @@ TODO
>   ETEXI
>
>   DEF("global", HAS_ARG, QEMU_OPTION_global,
> -    "-global driver.property=value\n"
> +    "-global driver.prop=value\n"
>       "                set a global default for a driver property\n",
>       QEMU_ARCH_ALL)
>   STEXI
> -@item -global
> +@item -global @var{driver}.@var{prop}=@var{value}
>   @findex -global
> -TODO
> +Set default value of @var{driver}'s property @var{prop} to @var{value}, e.g.:
> +
> +@example
> +qemu -global ide-drive.physical_block_size=4096 -drive file=file,if=ide,index=0,media=disk
> +@end example
> +
> +In particular, you can use this to set driver properties for devices which are
> +created automatically by the machine model. To create a device which is not
> +created automatically and set properties on it, use -@option{device}.
>   ETEXI
>
>   DEF("mtdblock", HAS_ARG, QEMU_OPTION_mtdblock,
>
>

Patch

diff --git a/qemu-options.hx b/qemu-options.hx
index daefce3..662f571 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -288,13 +288,21 @@  TODO
 ETEXI
 
 DEF("global", HAS_ARG, QEMU_OPTION_global,
-    "-global driver.property=value\n"
+    "-global driver.prop=value\n"
     "                set a global default for a driver property\n",
     QEMU_ARCH_ALL)
 STEXI
-@item -global
+@item -global @var{driver}.@var{prop}=@var{value}
 @findex -global
-TODO
+Set default value of @var{driver}'s property @var{prop} to @var{value}, e.g.:
+
+@example
+qemu -global ide-drive.physical_block_size=4096 -drive file=file,if=ide,index=0,media=disk
+@end example
+
+In particular, you can use this to set driver properties for devices which are 
+created automatically by the machine model. To create a device which is not 
+created automatically and set properties on it, use -@option{device}.
 ETEXI
 
 DEF("mtdblock", HAS_ARG, QEMU_OPTION_mtdblock,