From: Peter Avalos Date: Sun, 14 Jan 2007 18:14:39 +0000 (+0000) Subject: Suppress the error message for command -v for files with a slash. X-Git-Tag: v2.0.1~3695 X-Git-Url: https://gitweb.dragonflybsd.org/dragonfly.git/commitdiff_plain/ee44a32d351af67c0a7d2c64f2e4314b1adca838 Suppress the error message for command -v for files with a slash. Obtained-from: FreeBSD --- diff --git a/bin/sh/exec.c b/bin/sh/exec.c index d762ae961f..79b7a90818 100644 --- a/bin/sh/exec.c +++ b/bin/sh/exec.c @@ -34,8 +34,8 @@ * SUCH DAMAGE. * * @(#)exec.c 8.4 (Berkeley) 6/8/95 - * $FreeBSD: src/bin/sh/exec.c,v 1.29 2006/04/09 12:21:20 stefanf Exp $ - * $DragonFly: src/bin/sh/exec.c,v 1.10 2007/01/07 01:14:53 pavalos Exp $ + * $FreeBSD: src/bin/sh/exec.c,v 1.30 2007/01/11 00:19:00 stefanf Exp $ + * $DragonFly: src/bin/sh/exec.c,v 1.11 2007/01/14 18:14:39 pavalos Exp $ */ #include @@ -788,9 +788,10 @@ typecmd_impl(int argc, char **argv, int cmd) out1fmt("%s\n", argv[i]); else out1fmt(" is %s\n", argv[i]); - } - else { - out1fmt(": %s\n", strerror(errno)); + } else { + if (cmd != TYPECMD_SMALLV) + out1fmt(": %s\n", + strerror(errno)); err |= 127; } }