aboutsummaryrefslogtreecommitdiff
path: root/coreutils/rmdir.c
diff options
context:
space:
mode:
authorMatt Kraai <kraai@debian.org>2000-11-22 01:09:38 +0000
committerMatt Kraai <kraai@debian.org>2000-11-22 01:09:38 +0000
commit9a71af54f53332dda41823763d2ea85a4afdf2e0 (patch)
treeb84bec29f565fdb0033173043c8bda6fa9f1b597 /coreutils/rmdir.c
parentab8f9e286b15e043099d5b28b650e57823f8d273 (diff)
downloadbusybox-w32-9a71af54f53332dda41823763d2ea85a4afdf2e0.tar.gz
busybox-w32-9a71af54f53332dda41823763d2ea85a4afdf2e0.tar.bz2
busybox-w32-9a71af54f53332dda41823763d2ea85a4afdf2e0.zip
Fix behavior when removal fails.
Diffstat (limited to 'coreutils/rmdir.c')
-rw-r--r--coreutils/rmdir.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/coreutils/rmdir.c b/coreutils/rmdir.c
index 14ebf92c5..dfe53b215 100644
--- a/coreutils/rmdir.c
+++ b/coreutils/rmdir.c
@@ -28,14 +28,16 @@
28 28
29extern int rmdir_main(int argc, char **argv) 29extern int rmdir_main(int argc, char **argv)
30{ 30{
31 int status = EXIT_SUCCESS;
32
31 if (argc == 1 || **(argv + 1) == '-') 33 if (argc == 1 || **(argv + 1) == '-')
32 usage(rmdir_usage); 34 usage(rmdir_usage);
33 35
34 while (--argc > 0) { 36 while (--argc > 0) {
35 if (rmdir(*(++argv)) == -1) { 37 if (rmdir(*(++argv)) == -1) {
36 errorMsg("%s\n", strerror(errno)); 38 perrorMsg("%s", *argv);
37 exit(FALSE); 39 status = EXIT_FAILURE;
38 } 40 }
39 } 41 }
40 return(TRUE); 42 return status;
41} 43}