summaryrefslogtreecommitdiff
path: root/coreutils/du.c
diff options
context:
space:
mode:
authorErik Andersen2000-04-28 00:18:56 +0000
committerErik Andersen2000-04-28 00:18:56 +0000
commit4f3f757d56fbf420ea5030dcf7ea971b3da3ab47 (patch)
treed986e9bb9f03bf1f83465c274c35c0d58ed544e4 /coreutils/du.c
parent227a59b05d6df9b4be5990915646249d6f548822 (diff)
downloadbusybox-4f3f757d56fbf420ea5030dcf7ea971b3da3ab47.zip
busybox-4f3f757d56fbf420ea5030dcf7ea971b3da3ab47.tar.gz
Latest and greatest. Some effort at libc5 (aiming towards newlib)
compatability. -Erik
Diffstat (limited to 'coreutils/du.c')
-rw-r--r--coreutils/du.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/coreutils/du.c b/coreutils/du.c
index 8745380..c4fb3a3 100644
--- a/coreutils/du.c
+++ b/coreutils/du.c
@@ -32,7 +32,6 @@
#include <dirent.h>
#include <stdio.h>
#include <errno.h>
-#include <sys/param.h> /* for PATH_MAX */
typedef void (Display) (long, char *);
@@ -97,7 +96,7 @@ static long du(char *filename)
filename[--len] = '\0';
while ((entry = readdir(dir))) {
- char newfile[PATH_MAX + 1];
+ char newfile[BUFSIZ + 1];
char *name = entry->d_name;
if ((strcmp(name, "..") == 0)
@@ -105,7 +104,7 @@ static long du(char *filename)
continue;
}
- if (len + strlen(name) + 1 > PATH_MAX) {
+ if (len + strlen(name) + 1 > BUFSIZ) {
fprintf(stderr, name_too_long, "du");
du_depth--;
return 0;
@@ -182,7 +181,7 @@ int du_main(int argc, char **argv)
exit(0);
}
-/* $Id: du.c,v 1.17 2000/04/13 01:18:56 erik Exp $ */
+/* $Id: du.c,v 1.18 2000/04/28 00:18:56 erik Exp $ */
/*
Local Variables:
c-file-style: "linux"