From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Huth Subject: Re: [kvm-unit-tests PATCH 2/2] lib/util,arm,powerpc: replace parse_keyval with better helpers Date: Thu, 12 May 2016 15:27:05 +0200 Message-ID: <573484A9.2060108@redhat.com> References: <1463000114-3572-1-git-send-email-rkrcmar@redhat.com> <1463000114-3572-3-git-send-email-rkrcmar@redhat.com> <20160512071908.537ltvwkiiekqvri@hawk.localdomain> <20160512080551.3sm5cj6bc26fkkty@hawk.localdomain> <056cf3b0-99f1-a792-def6-cb4c82e72881@redhat.com> <20160512132209.GC5864@potion> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: Andrew Jones , kvm@vger.kernel.org, Paolo Bonzini To: =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= , Laurent Vivier Return-path: Received: from mx1.redhat.com ([209.132.183.28]:33408 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752817AbcELN1I (ORCPT ); Thu, 12 May 2016 09:27:08 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3ADCC77348 for ; Thu, 12 May 2016 13:27:08 +0000 (UTC) In-Reply-To: <20160512132209.GC5864@potion> Sender: kvm-owner@vger.kernel.org List-ID: On 12.05.2016 15:22, Radim Kr=C4=8Dm=C3=A1=C5=99 wrote: > 2016-05-12 10:09+0200, Laurent Vivier: >> I don't know if it can help, but instead of creating our own API, >> perhaps we can implement getopt() and getopt_long() and use them? >=20 > A known API is a good idea as long I'm not the one implementing it. := ) >=20 >> Or is it over-engineered? >=20 > Yeah, getopt would make both callers and the library more complicated= =2E We could maybe use the implementation from SLOF: http://git.qemu.org/?p=3DSLOF.git;a=3Dblob;f=3Dlib/libc/getopt/getopt.c= ;h=3Dbe626ddc290ee84b3605 It's BSD-licensed, so I think it should be ok to use it in kvm-unit-tests? Thomas