diff options
author | Otto Moerbeek <otto@cvs.openbsd.org> | 2006-12-26 20:59:24 +0000 |
---|---|---|
committer | Otto Moerbeek <otto@cvs.openbsd.org> | 2006-12-26 20:59:24 +0000 |
commit | c142be984edea72b334994c3ea4dc5e6f2384bd9 (patch) | |
tree | 49a02101adc81fe23e320156d862542bae566f32 /sbin/dump | |
parent | 6d4de8f423ba78b283301b8f5813d9a78fa4b2e7 (diff) |
fts_read returning NULL and errno set is an error. ok ray@
Diffstat (limited to 'sbin/dump')
-rw-r--r-- | sbin/dump/traverse.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sbin/dump/traverse.c b/sbin/dump/traverse.c index 6abec7820ef..bb045875d3a 100644 --- a/sbin/dump/traverse.c +++ b/sbin/dump/traverse.c @@ -1,4 +1,4 @@ -/* $OpenBSD: traverse.c,v 1.16 2006/04/02 00:48:35 deraadt Exp $ */ +/* $OpenBSD: traverse.c,v 1.17 2006/12/26 20:57:54 otto Exp $ */ /* $NetBSD: traverse.c,v 1.17 1997/06/05 11:13:27 lukem Exp $ */ /*- @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)traverse.c 8.2 (Berkeley) 9/23/93"; #else -static const char rcsid[] = "$OpenBSD: traverse.c,v 1.16 2006/04/02 00:48:35 deraadt Exp $"; +static const char rcsid[] = "$OpenBSD: traverse.c,v 1.17 2006/12/26 20:57:54 otto Exp $"; #endif #endif /* not lint */ @@ -190,6 +190,10 @@ mapfiles(ino_t maxino, off_t *tapesize, char *disk, char * const *dirv) mapfileino(entry->fts_statp->st_ino, tapesize, &anydirskipped); } + if (errno) { + msg("fts_read failed: %s\n", strerror(errno)); + dumpabort(0); + } (void)fts_close(dirh); /* |