diff options
author | Eric Andersen | 2000-12-11 17:08:21 +0000 |
---|---|---|
committer | Eric Andersen | 2000-12-11 17:08:21 +0000 |
commit | a293a516ad5af82028425f23a722fb75411d985b (patch) | |
tree | cf81b216a097ceac50f9c73fa9ea9a1811c6bc2e | |
parent | 394cf226682925384f24c6d0814df80f0be82bd0 (diff) | |
download | busybox-a293a516ad5af82028425f23a722fb75411d985b.zip busybox-a293a516ad5af82028425f23a722fb75411d985b.tar.gz |
Patch from kent robotti to fix a buglet where
# du doesn't_exist
du: doesn't_exist: No such file or directory
0 doesn't_exist
which was on course wrong. I simplified it a bit...
-rw-r--r-- | coreutils/du.c | 5 | ||||
-rw-r--r-- | du.c | 5 |
2 files changed, 4 insertions, 6 deletions
diff --git a/coreutils/du.c b/coreutils/du.c index ac9f606..be8fe5b 100644 --- a/coreutils/du.c +++ b/coreutils/du.c @@ -60,8 +60,7 @@ static long du(char *filename) int len; if ((lstat(filename, &statbuf)) != 0) { - printf("du: %s: %s\n", filename, strerror(errno)); - return 0; + perror_msg_and_die("%s:", filename); } du_depth++; @@ -166,7 +165,7 @@ int du_main(int argc, char **argv) return status; } -/* $Id: du.c,v 1.30 2000/12/09 17:07:12 andersen Exp $ */ +/* $Id: du.c,v 1.31 2000/12/11 17:08:21 andersen Exp $ */ /* Local Variables: c-file-style: "linux" @@ -60,8 +60,7 @@ static long du(char *filename) int len; if ((lstat(filename, &statbuf)) != 0) { - printf("du: %s: %s\n", filename, strerror(errno)); - return 0; + perror_msg_and_die("%s:", filename); } du_depth++; @@ -166,7 +165,7 @@ int du_main(int argc, char **argv) return status; } -/* $Id: du.c,v 1.30 2000/12/09 17:07:12 andersen Exp $ */ +/* $Id: du.c,v 1.31 2000/12/11 17:08:21 andersen Exp $ */ /* Local Variables: c-file-style: "linux" |