Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NXffa-0004ZE-PH for qemu-devel@nongnu.org; Wed, 20 Jan 2010 13:52:46 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NXffW-0004YV-Ke for qemu-devel@nongnu.org; Wed, 20 Jan 2010 13:52:46 -0500 Received: from [199.232.76.173] (port=47601 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NXffW-0004YS-GJ for qemu-devel@nongnu.org; Wed, 20 Jan 2010 13:52:42 -0500 Received: from mx1.redhat.com ([209.132.183.28]:57129) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NXffV-0003cu-V5 for qemu-devel@nongnu.org; Wed, 20 Jan 2010 13:52:42 -0500 From: Juan Quintela In-Reply-To: <4B574E13.2010102@mail.berlios.de> (Stefan Weil's message of "Wed, 20 Jan 2010 19:40:19 +0100") References: <4B574E13.2010102@mail.berlios.de> Date: Wed, 20 Jan 2010 19:52:30 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: [Qemu-devel] Re: [PATCH 1/5] substitute all uses of which by type List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Weil Cc: qemu-devel@nongnu.org Stefan Weil wrote: > Juan Quintela schrieb: >> Except in one case, we are only interested in knowing if a command >> exist, not is path. Just create prog_exists() function that does this >> check. >> >> Signed-off-by: Juan Quintela > > See comments below. The changes proposed are a suggestion, no real need. > > Regards, > Stefan > >> --- >> configure | 25 ++++++++++++++----------- >> 1 files changed, 14 insertions(+), 11 deletions(-) >> >> diff --git a/configure b/configure >> index 5631bbb..71edaf5 100755 >> --- a/configure >> +++ b/configure >> @@ -27,6 +27,11 @@ compile_prog() { >> $cc $QEMU_CFLAGS $local_cflags -o $TMPE $TMPC $LDFLAGS $local_ldflags >> > /dev/null 2> /dev/null >> } >> >> +prog_exist() { >> + prog="$1" >> + type $prog > /dev/null 2> /dev/null > > I personally prefer > + type $prog >/dev/null 2>&1 > because it is shorter (no whitespace after >, no duplicate /dev/null). > Currently, all variants to write this pattern are used. > Maybe we can reduce this. Agreed. For next series if there is not needed a rebase. Later, Juan.