From f4e746e87d838057c0857857d60141fde5fcfbae Mon Sep 17 00:00:00 2001 From: call-cc Date: Tue, 2 Jun 2020 17:17:33 -0400 Subject: [PATCH] Change errors in rmdir to warns --- src/rmdir.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/rmdir.c b/src/rmdir.c index ad1c343..c8f5f02 100644 --- a/src/rmdir.c +++ b/src/rmdir.c @@ -1,5 +1,6 @@ #include #include +#include int main(int argc, char *argv[]) { @@ -9,13 +10,13 @@ main(int argc, char *argv[]) { int fd = rmdir(argv[i]); /* Is it actually a file descriptor? */ if(fd == -1) { - fprintf(stderr,"Error removing dir %s\n",argv[i]); + warn("Error removing dir %s\n",argv[i]); errors++; } } if(errors>0) { - printf("%i error(s) found\n",errors); + warn("%i error(s) found\n",errors); } return 0; }