summaryrefslogtreecommitdiffstats
path: root/src/if.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2017-04-12 10:38:44 +0100
committerRoy Marples <roy@marples.name>2017-04-12 10:38:44 +0100
commit2eb366ec504e940518b9d270b615903f540686b0 (patch)
treee07abee023de8f5726652441fba491ae06cb2c7f /src/if.c
parent31fce8253991eb0f2d02bb7dbeeecb617b60b979 (diff)
downloaddhcpcd-2eb366ec504e940518b9d270b615903f540686b0.tar.xz
Add logdebugx, similar to logerrx and logwarnx.
logdebug now logs errors like logerr and logwarn.
Diffstat (limited to 'src/if.c')
-rw-r--r--src/if.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/if.c b/src/if.c
index 477f9c28..71385eef 100644
--- a/src/if.c
+++ b/src/if.c
@@ -359,14 +359,9 @@ if_discover(struct dhcpcd_ctx *ctx, int argc, char * const *argv)
}
if (if_vimaster(ctx, spec.devname) == 1) {
- if (argc)
- logerr("%s: is a Virtual Interface Master, "
- "skipping",
- spec.devname);
- else
- logdebug("%s: is a Virtual Interface Master, "
- "skipping",
- spec.devname);
+ logfunc_t *logfunc = argc != 0 ? logerrx : logdebugx;
+ logfunc("%s: is a Virtual Interface Master, skipping",
+ spec.devname);
continue;
}
@@ -416,7 +411,7 @@ if_discover(struct dhcpcd_ctx *ctx, int argc, char * const *argv)
ctx->ifac == 0 && active &&
!if_hasconf(ctx, ifp->name))
{
- logdebug("%s: ignoring due to"
+ logdebugx("%s: ignoring due to"
" interface type and"
" no config",
ifp->name);