"not removed" doesn't tell you a whole helluva lot
authorKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Mon, 21 Dec 1987 01:17:26 +0000 (17:17 -0800)
committerKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Mon, 21 Dec 1987 01:17:26 +0000 (17:17 -0800)
SCCS-vsn: bin/rm/rm.c 4.21

usr/src/bin/rm/rm.c

index 51de532..8c48e8b 100644 (file)
@@ -1,4 +1,4 @@
-static char *sccsid = "@(#)rm.c        4.20 (Berkeley) %G%";
+static char *sccsid = "@(#)rm.c        4.21 (Berkeley) %G%";
 
 /*
  * rm - for ReMoving files, directories & trees.
 
 /*
  * rm - for ReMoving files, directories & trees.
@@ -200,7 +200,8 @@ rm(arg, level)
        }
 rm:    if (unlink(arg) < 0) {
                if (!fflg || iflg) {
        }
 rm:    if (unlink(arg) < 0) {
                if (!fflg || iflg) {
-                       fprintf(stderr, "rm: %s not removed\n", arg);
+                       fprintf(stderr, "rm: %s: ", arg);
+                       perror((char *)NULL);
                        errcode++;
                }
                return (0);
                        errcode++;
                }
                return (0);