diff options
author | edwin <edwin@FreeBSD.org> | 2007-12-26 08:32:20 +0000 |
---|---|---|
committer | edwin <edwin@FreeBSD.org> | 2007-12-26 08:32:20 +0000 |
commit | fff68913a67ad5f2b7f9c64f14ea2d2fc0d7bdc8 (patch) | |
tree | 0bdf8b3a830063ac481489c0140e001057896ff5 /bin/cp | |
parent | b3fd39940129e837e0c9726907a8de0df54ecbbf (diff) | |
download | FreeBSD-src-fff68913a67ad5f2b7f9c64f14ea2d2fc0d7bdc8.zip FreeBSD-src-fff68913a67ad5f2b7f9c64f14ea2d2fc0d7bdc8.tar.gz |
As suggested, replace earlier changed warnx() / exit() with an errx()
Submitted by: Peter Jeremy <peterjeremy@optushome.com.au>
Diffstat (limited to 'bin/cp')
-rw-r--r-- | bin/cp/cp.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/bin/cp/cp.c b/bin/cp/cp.c index 4405605..823d93e 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 |