because of fts library update
This commit is contained in:
parent
57b5a6be2d
commit
ab8f70aa6d
@ -42,7 +42,7 @@ char copyright[] =
|
||||
|
||||
#ifndef lint
|
||||
/*static char sccsid[] = "from: @(#)du.c 5.12 (Berkeley) 6/20/91";*/
|
||||
static char rcsid[] = "$Id: du.c,v 1.2 1993/08/01 18:16:53 mycroft Exp $";
|
||||
static char rcsid[] = "$Id: du.c,v 1.3 1993/08/06 01:36:45 deraadt Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -117,7 +117,7 @@ main(argc, argv)
|
||||
break;
|
||||
case FTS_DP:
|
||||
p->fts_parent->fts_number +=
|
||||
p->fts_number += p->fts_statb.st_blocks;
|
||||
p->fts_number += p->fts_statp->st_blocks;
|
||||
/*
|
||||
* If listing each directory, or not listing files
|
||||
* or directories and this is post-order of the
|
||||
@ -141,7 +141,7 @@ main(argc, argv)
|
||||
}
|
||||
/* FALLTHROUGH */
|
||||
default:
|
||||
if (p->fts_statb.st_nlink > 1 && linkchk(p))
|
||||
if (p->fts_statp->st_nlink > 1 && linkchk(p))
|
||||
break;
|
||||
/*
|
||||
* If listing each file, or a non-directory file was
|
||||
@ -149,9 +149,9 @@ main(argc, argv)
|
||||
*/
|
||||
if (listfiles || !p->fts_level)
|
||||
(void)printf("%ld\t%s\n", kvalue ?
|
||||
howmany(p->fts_statb.st_blocks, 2) :
|
||||
p->fts_statb.st_blocks, p->fts_path);
|
||||
p->fts_parent->fts_number += p->fts_statb.st_blocks;
|
||||
howmany(p->fts_statp->st_blocks, 2) :
|
||||
p->fts_statp->st_blocks, p->fts_path);
|
||||
p->fts_parent->fts_number += p->fts_statp->st_blocks;
|
||||
}
|
||||
exit(0);
|
||||
}
|
||||
@ -170,8 +170,8 @@ linkchk(p)
|
||||
register ino_t ino;
|
||||
register dev_t dev;
|
||||
|
||||
ino = p->fts_statb.st_ino;
|
||||
dev = p->fts_statb.st_dev;
|
||||
ino = p->fts_statp->st_ino;
|
||||
dev = p->fts_statp->st_dev;
|
||||
if (start = files)
|
||||
for (fp = start + nfiles - 1; fp >= start; --fp)
|
||||
if (ino == fp->inode && dev == fp->dev)
|
||||
|
Loading…
Reference in New Issue
Block a user