summaryrefslogtreecommitdiff
path: root/du.c
diff options
context:
space:
mode:
authorErik Andersen <andersen@codepoet.org>2000-02-11 21:55:04 +0000
committerErik Andersen <andersen@codepoet.org>2000-02-11 21:55:04 +0000
commit9ffdaa647ee57263247e047e6c67c5a7fa1f2a6c (patch)
tree3485e1645439990642fcb941d579deb10f8a17a7 /du.c
parent5e1b2ca1161cba481ccf4873427389f59dbc23e0 (diff)
downloadbusybox-w32-9ffdaa647ee57263247e047e6c67c5a7fa1f2a6c.tar.gz
busybox-w32-9ffdaa647ee57263247e047e6c67c5a7fa1f2a6c.tar.bz2
busybox-w32-9ffdaa647ee57263247e047e6c67c5a7fa1f2a6c.zip
Updates
-Erik
Diffstat (limited to 'du.c')
-rw-r--r--du.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/du.c b/du.c
index 7151e3a9c..912605882 100644
--- a/du.c
+++ b/du.c
@@ -72,6 +72,10 @@ static long du(char *filename)
72 du_depth++; 72 du_depth++;
73 sum = statbuf.st_blocks; 73 sum = statbuf.st_blocks;
74 74
75 /* Don't add in stuff pointed to by links */
76 if (S_ISLNK(statbuf.st_mode)) {
77 return 0;
78 }
75 if (S_ISDIR(statbuf.st_mode)) { 79 if (S_ISDIR(statbuf.st_mode)) {
76 DIR *dir; 80 DIR *dir;
77 struct dirent *entry; 81 struct dirent *entry;
@@ -140,7 +144,7 @@ int du_main(int argc, char **argv)
140 144
141 for (; i < argc; i++) { 145 for (; i < argc; i++) {
142 sum = du(argv[i]); 146 sum = du(argv[i]);
143 if ((sum) && (isDirectory(argv[i], FALSE))) { 147 if ((sum) && (isDirectory(argv[i], FALSE, NULL))) {
144 print_normal(sum, argv[i]); 148 print_normal(sum, argv[i]);
145 } 149 }
146 } 150 }
@@ -149,4 +153,4 @@ int du_main(int argc, char **argv)
149 exit(0); 153 exit(0);
150} 154}
151 155
152/* $Id: du.c,v 1.11 2000/02/08 19:58:47 erik Exp $ */ 156/* $Id: du.c,v 1.12 2000/02/11 21:55:04 erik Exp $ */