Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/pkg_install/lib Use "rm -fr" consistently.



details:   https://anonhg.NetBSD.org/src/rev/073a4e045720
branches:  trunk
changeset: 550918:073a4e045720
user:      tron <tron%NetBSD.org@localhost>
date:      Mon Aug 25 10:23:06 2003 +0000

description:
Use "rm -fr" consistently.

diffstat:

 usr.sbin/pkg_install/lib/pen.c |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (39 lines):

diff -r bbba0792b63a -r 073a4e045720 usr.sbin/pkg_install/lib/pen.c
--- a/usr.sbin/pkg_install/lib/pen.c    Mon Aug 25 10:05:46 2003 +0000
+++ b/usr.sbin/pkg_install/lib/pen.c    Mon Aug 25 10:23:06 2003 +0000
@@ -1,11 +1,11 @@
-/*     $NetBSD: pen.c,v 1.28 2003/08/24 21:11:39 tron Exp $    */
+/*     $NetBSD: pen.c,v 1.29 2003/08/25 10:23:06 tron Exp $    */
 
 #include <sys/cdefs.h>
 #ifndef lint
 #if 0
 static const char *rcsid = "from FreeBSD Id: pen.c,v 1.25 1997/10/08 07:48:12 charnier Exp";
 #else
-__RCSID("$NetBSD: pen.c,v 1.28 2003/08/24 21:11:39 tron Exp $");
+__RCSID("$NetBSD: pen.c,v 1.29 2003/08/25 10:23:06 tron Exp $");
 #endif
 #endif
 
@@ -38,7 +38,7 @@
 /* For keeping track of where we are */
 static char Current[FILENAME_MAX];
 static char Previous[FILENAME_MAX];
-static int CurrentSet;         /* rm -rf Current only if it's really set! */
+static int CurrentSet;         /* rm -fr Current only if it's really set! */
                                 /* CurrentSet is set to 0 before strcpy()s
                                 * to prevent rm'ing of a partial string
                                 * when interrupted by ^C */
@@ -182,10 +182,10 @@
                errx(2, "can't chdir back to '%s'", Previous);
        } else if (CurrentSet && Current[0] && strcmp(Current, Previous)) {
                if (strcmp(Current, "/") == 0) {
-                       fprintf(stderr, "PANIC: About to rm -rf / (not doing so, aborting)\n");
+                       fprintf(stderr, "PANIC: About to rm -fr / (not doing so, aborting)\n");
                        abort();
                }
-               if (fexec("rm", "-rf", Current, NULL))
+               if (fexec("rm", "-fr", Current, NULL))
                        warnx("couldn't remove temporary dir '%s'", Current);
                strlcpy(Current, Previous, sizeof(Current));
        }



Home | Main Index | Thread Index | Old Index