k9core

Unnamed repository
Log | Files | Refs | LICENSE

commit f4e746e87d838057c0857857d60141fde5fcfbae
parent 9486a5004ef24a008d2aa2f12c9d5eaecad0c431
Author: call-cc <callcc@vxempire.xyz>
Date:   Tue,  2 Jun 2020 17:17:33 -0400

Change errors in rmdir to warns

Diffstat:
Msrc/rmdir.c | 5+++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/rmdir.c b/src/rmdir.c @@ -1,5 +1,6 @@ #include <unistd.h> #include <stdio.h> +#include <err.h> 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; }