Source-Changes-HG archive

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

[src/trunk]: src/distrib/utils/sysinst don't worry about non-existing files w...



details:   https://anonhg.NetBSD.org/src/rev/03d27d2029d4
branches:  trunk
changeset: 488112:03d27d2029d4
user:      hubertf <hubertf%NetBSD.org@localhost>
date:      Sun Jun 18 13:40:41 2000 +0000

description:
don't worry about non-existing files when deleting obsolete files
in the upgrade-case. just skip them silently.

diffstat:

 distrib/utils/sysinst/util.c |  5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diffs (19 lines):

diff -r 3d86e43027d5 -r 03d27d2029d4 distrib/utils/sysinst/util.c
--- a/distrib/utils/sysinst/util.c      Sun Jun 18 10:33:18 2000 +0000
+++ b/distrib/utils/sysinst/util.c      Sun Jun 18 13:40:41 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: util.c,v 1.50 2000/03/14 22:42:49 fvdl Exp $   */
+/*     $NetBSD: util.c,v 1.51 2000/06/18 13:40:41 hubertf Exp $        */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -659,6 +659,9 @@
                        (void)fprintf(script, "rm %s\n", current->name);
                if (unlink(current->name) != 0) {
                        saved_errno = errno;
+                       if (saved_errno == ENOENT)
+                               continue;       /* don't worry about
+                                                  non-existing files */
                        if (logging)
                                fprintf(log, "rm %s failed: %s\n",
                                    current->name, strerror(saved_errno));



Home | Main Index | Thread Index | Old Index