Use *->fts_errno instead of errno after fts_read(). The fts manpage
indicates that the fts_errno will be set to the correct value, but there are no guarentees about errno.
This commit is contained in:
parent
791db40a49
commit
99cd400e2e
|
@ -36,7 +36,7 @@
|
|||
|
||||
#ifndef lint
|
||||
/*static char sccsid[] = "from: @(#)find.c 5.3 (Berkeley) 5/25/91";*/
|
||||
static char rcsid[] = "$Id: find.c,v 1.2 1993/08/01 18:16:16 mycroft Exp $";
|
||||
static char rcsid[] = "$Id: find.c,v 1.3 1993/10/01 01:03:22 jtc Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
#include <sys/types.h>
|
||||
|
@ -165,7 +165,7 @@ find_execute(plan, paths)
|
|||
case FTS_ERR:
|
||||
case FTS_NS:
|
||||
(void)fprintf(stderr, "find: %s: %s\n",
|
||||
entry->fts_path, strerror(errno));
|
||||
entry->fts_path, strerror(entry->fts_errno));
|
||||
continue;
|
||||
case FTS_SL:
|
||||
if (entry->fts_level == FTS_ROOTLEVEL) {
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
|
||||
#ifndef lint
|
||||
/*static char sccsid[] = "from: @(#)create.c 5.16 (Berkeley) 3/12/91";*/
|
||||
static char rcsid[] = "$Id: create.c,v 1.3 1993/08/06 03:48:28 deraadt Exp $";
|
||||
static char rcsid[] = "$Id: create.c,v 1.4 1993/10/01 01:06:39 jtc Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
#include <sys/param.h>
|
||||
|
@ -102,7 +102,7 @@ cwalk()
|
|||
case FTS_ERR:
|
||||
case FTS_NS:
|
||||
(void)fprintf(stderr, "mtree: %s: %s.\n",
|
||||
p->fts_path, strerror(errno));
|
||||
p->fts_path, strerror(p->fts_errno));
|
||||
continue;
|
||||
default:
|
||||
if (dflag)
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
|
||||
#ifndef lint
|
||||
/*static char sccsid[] = "from: @(#)verify.c 5.9 (Berkeley) 3/12/91";*/
|
||||
static char rcsid[] = "$Id: verify.c,v 1.4 1993/08/01 17:58:23 mycroft Exp $";
|
||||
static char rcsid[] = "$Id: verify.c,v 1.5 1993/10/01 01:06:42 jtc Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
#include <sys/param.h>
|
||||
|
@ -92,7 +92,7 @@ vwalk()
|
|||
case FTS_ERR:
|
||||
case FTS_NS:
|
||||
(void)fprintf(stderr, "mtree: %s: %s.\n",
|
||||
RP(p), strerror(errno));
|
||||
RP(p), strerror(p->fts_errno));
|
||||
continue;
|
||||
default:
|
||||
if (dflag)
|
||||
|
|
Loading…
Reference in New Issue