| 34 |
* SUCH DAMAGE. |
* SUCH DAMAGE. |
| 35 |
*/ |
*/ |
| 36 |
|
|
| 37 |
#ifndef lint |
#include <sys/param.h> |
|
#if 0 |
|
|
static const char sccsid[] = "@(#)ftree.c 8.2 (Berkeley) 4/18/94"; |
|
|
#else |
|
|
static const char rcsid[] = "$OpenBSD: ftree.c,v 1.26 2005/04/21 21:47:18 beck Exp $"; |
|
|
#endif |
|
|
#endif /* not lint */ |
|
|
|
|
|
#include <sys/types.h> |
|
| 38 |
#include <sys/time.h> |
#include <sys/time.h> |
| 39 |
#include <sys/stat.h> |
#include <sys/stat.h> |
|
#include <sys/param.h> |
|
| 40 |
#include <unistd.h> |
#include <unistd.h> |
| 41 |
#include <string.h> |
#include <string.h> |
| 42 |
#include <stdio.h> |
#include <stdio.h> |
| 47 |
#include "ftree.h" |
#include "ftree.h" |
| 48 |
#include "extern.h" |
#include "extern.h" |
| 49 |
|
|
| 50 |
|
__SCCSID("@(#)ftree.c 8.2 (Berkeley) 4/18/94"); |
| 51 |
|
__RCSID("$MirOS: src/bin/pax/ftree.c,v 1.2 2007/02/17 04:52:40 tg Exp $"); |
| 52 |
|
|
| 53 |
/* |
/* |
| 54 |
* routines to interface with the fts library function. |
* routines to interface with the fts library function. |
| 55 |
* |
* |
| 488 |
* copy file name, set file name length |
* copy file name, set file name length |
| 489 |
*/ |
*/ |
| 490 |
arcn->nlen = strlcpy(arcn->name, ftent->fts_path, sizeof(arcn->name)); |
arcn->nlen = strlcpy(arcn->name, ftent->fts_path, sizeof(arcn->name)); |
| 491 |
if (arcn->nlen >= sizeof(arcn->name)) |
if ((size_t)arcn->nlen >= sizeof(arcn->name)) |
| 492 |
arcn->nlen = sizeof(arcn->name) - 1; /* XXX truncate? */ |
arcn->nlen = sizeof(arcn->name) - 1; /* XXX truncate? */ |
| 493 |
arcn->org_name = ftent->fts_path; |
arcn->org_name = ftent->fts_path; |
| 494 |
return(0); |
return(0); |