ash: code shrink around varvalue
[oweals/busybox.git] / libbb / remove_file.c
index c6531a0b99a6c3e99dadedbf401da03c4434df35..eaca293d99dc061b2e628a18184921ce498f464a 100644 (file)
@@ -33,7 +33,7 @@ int FAST_FUNC remove_file(const char *path, int flags)
                int status = 0;
 
                if (!(flags & FILEUTILS_RECUR)) {
-                       bb_error_msg("%s: is a directory", path);
+                       bb_error_msg("'%s' is a directory", path);
                        return -1;
                }
 
@@ -78,6 +78,10 @@ int FAST_FUNC remove_file(const char *path, int flags)
                        return -1;
                }
 
+               if (flags & FILEUTILS_VERBOSE) {
+                       printf("removed directory: '%s'\n", path);
+               }
+
                return status;
        }
 
@@ -98,5 +102,9 @@ int FAST_FUNC remove_file(const char *path, int flags)
                return -1;
        }
 
+       if (flags & FILEUTILS_VERBOSE) {
+               printf("removed '%s'\n", path);
+       }
+
        return 0;
 }