qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH ] qemu-help: add category headlines


From: Andreas Färber
Subject: Re: [Qemu-devel] [PATCH ] qemu-help: add category headlines
Date: Thu, 22 Aug 2013 16:00:28 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130801 Thunderbird/17.0.8

Am 22.08.2013 14:48, schrieb Marcel Apfelbaum:
> This patch follows Markus Armbruster suggestion:
> 
> A possibly better way to group help by category: instead of adding
> categories to each line, add category headlines, like this:
> 
>     Controller/Bridge/Hub devices:
>     name "NAME", bus "BUS"...
>     ...
>     USB devices:
>     name "NAME", bus "BUS"...
>     ...
>     Storage devices:
>     ...
> 
> This way, showing devices with multiple categories once per category
> actually makes sense.
> 
> Note that the "categories to each line" is kept for 2 reasons:
> 1. Preparation for multifunction devices
> 2. Ability to grep by category
> 
> Signed-off-by: Marcel Apfelbaum <address@hidden>
> ---
>  qdev-monitor.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/qdev-monitor.c b/qdev-monitor.c
> index 410cdcb..a7329b0 100644
> --- a/qdev-monitor.c
> +++ b/qdev-monitor.c
> @@ -156,6 +156,8 @@ static void qdev_print_category_devices(DeviceCategory 
> category)
>      DeviceClass *dc;
>      GSList *list, *curr;
>  
> +    error_printf("%s devices:\n", qdev_category_get_name(category));

Why is that an error? Shouldn't it go to stdout?

Andreas

> +
>      list = object_class_get_list(TYPE_DEVICE, false);
>      for (curr = list; curr; curr = g_slist_next(curr)) {
>          dc = (DeviceClass *)object_class_dynamic_cast(curr->data, 
> TYPE_DEVICE);
> 


-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg



reply via email to

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