qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH for-2.3] configure: Replace which(1) with "has"
@ 2014-12-04  6:18 Fam Zheng
  2014-12-04  6:30 ` Stefan Weil
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Fam Zheng @ 2014-12-04  6:18 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial, Peter Maydell

Using "has" is more slick because which(1) is not always there.

Signed-off-by: Fam Zheng <famz@redhat.com>
---
 configure | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure b/configure
index 47048f0..cae588c 100755
--- a/configure
+++ b/configure
@@ -2727,7 +2727,7 @@ fi
 if test "$modules" = yes; then
     shacmd_probe="sha1sum sha1 shasum"
     for c in $shacmd_probe; do
-        if which $c >/dev/null 2>&1; then
+        if has $c; then
             shacmd="$c"
             break
         fi
-- 
1.9.3

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH for-2.3] configure: Replace which(1) with "has"
  2014-12-04  6:18 [Qemu-devel] [PATCH for-2.3] configure: Replace which(1) with "has" Fam Zheng
@ 2014-12-04  6:30 ` Stefan Weil
  2014-12-04  6:40 ` Amos Kong
  2014-12-10  8:36 ` [Qemu-devel] [Qemu-trivial] " Michael Tokarev
  2 siblings, 0 replies; 4+ messages in thread
From: Stefan Weil @ 2014-12-04  6:30 UTC (permalink / raw)
  To: Fam Zheng, qemu-devel; +Cc: qemu-trivial, Peter Maydell

Am 04.12.2014 um 07:18 schrieb Fam Zheng:
> Using "has" is more slick because which(1) is not always there.
> 
> Signed-off-by: Fam Zheng <famz@redhat.com>
> ---
>  configure | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/configure b/configure
> index 47048f0..cae588c 100755
> --- a/configure
> +++ b/configure
> @@ -2727,7 +2727,7 @@ fi
>  if test "$modules" = yes; then
>      shacmd_probe="sha1sum sha1 shasum"
>      for c in $shacmd_probe; do
> -        if which $c >/dev/null 2>&1; then
> +        if has $c; then
>              shacmd="$c"
>              break
>          fi


Reviewed-by: Stefan Weil <sw@weilnetz.de>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH for-2.3] configure: Replace which(1) with "has"
  2014-12-04  6:18 [Qemu-devel] [PATCH for-2.3] configure: Replace which(1) with "has" Fam Zheng
  2014-12-04  6:30 ` Stefan Weil
@ 2014-12-04  6:40 ` Amos Kong
  2014-12-10  8:36 ` [Qemu-devel] [Qemu-trivial] " Michael Tokarev
  2 siblings, 0 replies; 4+ messages in thread
From: Amos Kong @ 2014-12-04  6:40 UTC (permalink / raw)
  To: Fam Zheng; +Cc: qemu-trivial, Peter Maydell, qemu-devel

[-- Attachment #1: Type: text/plain, Size: 825 bytes --]

On Thu, Dec 04, 2014 at 02:18:16PM +0800, Fam Zheng wrote:
> Using "has" is more slick because which(1) is not always there.
> 
> Signed-off-by: Fam Zheng <famz@redhat.com>
> ---
>  configure | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/configure b/configure
> index 47048f0..cae588c 100755
> --- a/configure
> +++ b/configure
> @@ -2727,7 +2727,7 @@ fi
>  if test "$modules" = yes; then
>      shacmd_probe="sha1sum sha1 shasum"
>      for c in $shacmd_probe; do
> -        if which $c >/dev/null 2>&1; then
> +        if has $c; then

we use self defined has function to check command in all other place
in configure. LGTM.

Reviewed-by: Amos Kong <akong@redhat.com>

>              shacmd="$c"
>              break
>          fi
> -- 
> 1.9.3
> 

-- 
			Amos.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [Qemu-trivial] [PATCH for-2.3] configure: Replace which(1) with "has"
  2014-12-04  6:18 [Qemu-devel] [PATCH for-2.3] configure: Replace which(1) with "has" Fam Zheng
  2014-12-04  6:30 ` Stefan Weil
  2014-12-04  6:40 ` Amos Kong
@ 2014-12-10  8:36 ` Michael Tokarev
  2 siblings, 0 replies; 4+ messages in thread
From: Michael Tokarev @ 2014-12-10  8:36 UTC (permalink / raw)
  To: Fam Zheng, qemu-devel; +Cc: qemu-trivial, Peter Maydell

04.12.2014 09:18, Fam Zheng wrote:
> Using "has" is more slick because which(1) is not always there.

Applied to -trivial, thank you!

/mjt

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-12-10  8:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-04  6:18 [Qemu-devel] [PATCH for-2.3] configure: Replace which(1) with "has" Fam Zheng
2014-12-04  6:30 ` Stefan Weil
2014-12-04  6:40 ` Amos Kong
2014-12-10  8:36 ` [Qemu-devel] [Qemu-trivial] " Michael Tokarev

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).