]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Use better error messages.
authorRoy Marples <roy@marples.name>
Tue, 13 May 2008 20:25:22 +0000 (20:25 +0000)
committerRoy Marples <roy@marples.name>
Tue, 13 May 2008 20:25:22 +0000 (20:25 +0000)
client.c
configure.c

index 960b690510809567dad2e3b347fa53d19aede4d1..af0d8169b7ac0f102a5002adc03865052e19452b 100644 (file)
--- a/client.c
+++ b/client.c
@@ -191,7 +191,7 @@ daemonise(struct if_state *state, const struct options *options)
 
        switch (pid = vfork()) {
                case -1:
-                       logger(LOG_ERR, "vfork: %s", strerror (errno));
+                       logger(LOG_ERR, "vfork: %s", strerror(errno));
                        _exit(EXIT_FAILURE);
                case 0:
                        signal_reset();
index 0590202b8700974112a59ef240ff24b97dff0e05..2db4397889709322216a38ec8788953f3c41dec3 100644 (file)
@@ -109,7 +109,11 @@ exec_script(const char *script, const char *iface, const char *reason,
 
        switch (pid) {
        case -1:
+#ifdef THERE_IS_NO_FORK
+               logger(LOG_ERR, "vfork: %s", strerror(errno));
+#else
                logger(LOG_ERR, "fork: %s", strerror(errno));
+#endif
                ret = -1;
                break;
        case 0: