Source-Changes-HG archive

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

[src/trunk]: src/usr.sbin/config If unlink() fails w/ ENOENT, don't display a...



details:   https://anonhg.NetBSD.org/src/rev/c9583fc06d5c
branches:  trunk
changeset: 475078:c9583fc06d5c
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Sat Jul 31 05:22:05 1999 +0000

description:
If unlink() fails w/ ENOENT, don't display an error message.

diffstat:

 usr.sbin/config/main.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r e3b2e59c7e65 -r c9583fc06d5c usr.sbin/config/main.c
--- a/usr.sbin/config/main.c    Sat Jul 31 03:30:44 1999 +0000
+++ b/usr.sbin/config/main.c    Sat Jul 31 05:22:05 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: main.c,v 1.41 1999/07/29 20:08:59 hubertf Exp $        */
+/*     $NetBSD: main.c,v 1.42 1999/07/31 05:22:05 thorpej Exp $        */
 
 /*
  * Copyright (c) 1992, 1993
@@ -328,7 +328,7 @@
        sprintf(buf, "arch/%s/include", machine);
        p = sourcepath(buf);
        ret = unlink("machine");
-       if (ret)
+       if (ret && errno != ENOENT)
                (void)fprintf(stderr, "config: unlink(machine): %s\n",
                    strerror(errno));
        ret = symlink(p, "machine");
@@ -346,7 +346,7 @@
                q = machine;
        }
        ret = unlink(q);
-       if (ret)
+       if (ret && errno != ENOENT)
                (void)fprintf(stderr, "config: unlink(%s): %s\n",
                    q, strerror(errno));
        ret = symlink(p, q);



Home | Main Index | Thread Index | Old Index