diff options
author | Erik Andersen <andersen@codepoet.org> | 2000-02-11 21:55:04 +0000 |
---|---|---|
committer | Erik Andersen <andersen@codepoet.org> | 2000-02-11 21:55:04 +0000 |
commit | 9ffdaa647ee57263247e047e6c67c5a7fa1f2a6c (patch) | |
tree | 3485e1645439990642fcb941d579deb10f8a17a7 /du.c | |
parent | 5e1b2ca1161cba481ccf4873427389f59dbc23e0 (diff) | |
download | busybox-w32-9ffdaa647ee57263247e047e6c67c5a7fa1f2a6c.tar.gz busybox-w32-9ffdaa647ee57263247e047e6c67c5a7fa1f2a6c.tar.bz2 busybox-w32-9ffdaa647ee57263247e047e6c67c5a7fa1f2a6c.zip |
Updates
-Erik
Diffstat (limited to 'du.c')
-rw-r--r-- | du.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -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 $ */ |