From a76b9b6973268d413497713bccc3aba7c03a1869 Mon Sep 17 00:00:00 2001 From: Edwin Groothuis Date: Wed, 26 Dec 2007 08:32:20 +0000 Subject: [PATCH] As suggested, replace earlier changed warnx() / exit() with an errx() Submitted by: Peter Jeremy --- bin/cp/cp.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/bin/cp/cp.c b/bin/cp/cp.c index 44056058287f..823d93e00e08 100644 --- a/bin/cp/cp.c +++ b/bin/cp/cp.c @@ -210,10 +210,9 @@ main(int argc, char *argv[]) /* * Case (1). Target is not a directory. */ - if (argc > 1) { - warnx("Target is not a directory"); - exit(1); - } + if (argc > 1) + errx(1, "%s is not a directory", to.p_path); + /* * Need to detect the case: * cp -R dir foo