summaryrefslogtreecommitdiff
path: root/coreutils/rmdir.c
diff options
context:
space:
mode:
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 14ebf92..dfe53b2 100644
--- a/coreutils/rmdir.c
+++ b/coreutils/rmdir.c
@@ -28,14 +28,16 @@
extern int rmdir_main(int argc, char **argv)
{
+ int status = EXIT_SUCCESS;
+
if (argc == 1 || **(argv + 1) == '-')
usage(rmdir_usage);
while (--argc > 0) {
if (rmdir(*(++argv)) == -1) {
- errorMsg("%s\n", strerror(errno));
- exit(FALSE);
+ perrorMsg("%s", *argv);
+ status = EXIT_FAILURE;
}
}
- return(TRUE);
+ return status;
}