summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>2014-12-01 03:11:55 +0000
committermillert <millert@openbsd.org>2014-12-01 03:11:55 +0000
commitfc823e6996b2ba63057652ffa93f22c44cdf46c9 (patch)
tree31badc809d417a79270f6b0674c2d8289a689c5c
parentrxr ioctl handling. (diff)
downloadwireguard-openbsd-fc823e6996b2ba63057652ffa93f22c44cdf46c9.tar.xz
wireguard-openbsd-fc823e6996b2ba63057652ffa93f22c44cdf46c9.zip
Use warnc() to use the correct errno value for FTS_DNR, FTS_NS and
FTS_ERR. From Piotr Durlej.
-rw-r--r--usr.bin/find/find.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/find/find.c b/usr.bin/find/find.c
index ba8808f40fc..319f77fa1c8 100644
--- a/usr.bin/find/find.c
+++ b/usr.bin/find/find.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: find.c,v 1.16 2012/01/02 23:19:45 pascal Exp $ */
+/* $OpenBSD: find.c,v 1.17 2014/12/01 03:11:55 millert Exp $ */
/*-
* Copyright (c) 1991, 1993
@@ -180,7 +180,7 @@ find_execute(PLAN *plan, /* search plan */
case FTS_ERR:
case FTS_NS:
(void)fflush(stdout);
- warn("%s", entry->fts_path);
+ warnc(entry->fts_errno, "%s", entry->fts_path);
rval = 1;
continue;
}