From f070188c3ad6b87ee9ce220b21718333d1bd9d52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dag-Erling=20Sm=C3=B8rgrav?= Date: Wed, 17 Apr 2024 04:07:20 +0200 Subject: [PATCH] cp: Use warnc(). MFC after: 1 week Sponsored by: Klara, Inc. --- bin/cp/cp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/bin/cp/cp.c b/bin/cp/cp.c index 98697ba2b06f..823376964bd1 100644 --- a/bin/cp/cp.c +++ b/bin/cp/cp.c @@ -287,8 +287,7 @@ copy(char *argv[], enum op type, int fts_options, struct stat *root_stat) case FTS_NS: case FTS_DNR: case FTS_ERR: - warnx("%s: %s", - curr->fts_path, strerror(curr->fts_errno)); + warnc(curr->fts_errno, "%s", curr->fts_path); badcp = rval = 1; continue; case FTS_DC: /* Warn, continue. */