cp: Use warnc().

MFC after:	1 week
Sponsored by:	Klara, Inc.
This commit is contained in:
Dag-Erling Smørgrav 2024-04-17 04:07:20 +02:00
parent 000a533e6d
commit f070188c3a

View File

@ -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. */