From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42379) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VCVRH-0007fV-Gr for qemu-devel@nongnu.org; Thu, 22 Aug 2013 10:00:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VCVR9-0002kz-Or for qemu-devel@nongnu.org; Thu, 22 Aug 2013 10:00:39 -0400 Received: from cantor2.suse.de ([195.135.220.15]:39505 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VCVR9-0002kp-IQ for qemu-devel@nongnu.org; Thu, 22 Aug 2013 10:00:31 -0400 Message-ID: <5216197C.2060509@suse.de> Date: Thu, 22 Aug 2013 16:00:28 +0200 From: =?ISO-8859-15?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <1377175700-16229-1-git-send-email-marcel.a@redhat.com> In-Reply-To: <1377175700-16229-1-git-send-email-marcel.a@redhat.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH ] qemu-help: add category headlines List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Marcel Apfelbaum Cc: pbonzini@redhat.com, aliguori@us.ibm.com, mst@redhat.com, qemu-devel@nongnu.org, armbru@redhat.com Am 22.08.2013 14:48, schrieb Marcel Apfelbaum: > This patch follows Markus Armbruster suggestion: >=20 > A possibly better way to group help by category: instead of adding > categories to each line, add category headlines, like this: >=20 > Controller/Bridge/Hub devices: > name "NAME", bus "BUS"... > ... > USB devices: > name "NAME", bus "BUS"... > ... > Storage devices: > ... >=20 > This way, showing devices with multiple categories once per category > actually makes sense. >=20 > Note that the "categories to each line" is kept for 2 reasons: > 1. Preparation for multifunction devices > 2. Ability to grep by category >=20 > Signed-off-by: Marcel Apfelbaum > --- > qdev-monitor.c | 2 ++ > 1 file changed, 2 insertions(+) >=20 > 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(DeviceCateg= ory category) > DeviceClass *dc; > GSList *list, *curr; > =20 > + error_printf("%s devices:\n", qdev_category_get_name(category)); Why is that an error? Shouldn't it go to stdout? Andreas > + > list =3D object_class_get_list(TYPE_DEVICE, false); > for (curr =3D list; curr; curr =3D g_slist_next(curr)) { > dc =3D (DeviceClass *)object_class_dynamic_cast(curr->data, TY= PE_DEVICE); >=20 --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=F6rffer; HRB 16746 AG N=FCrnbe= rg