diff options
| author | Roy Marples <roy@marples.name> | 2017-04-12 10:38:44 +0100 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2017-04-12 10:38:44 +0100 |
| commit | 2eb366ec504e940518b9d270b615903f540686b0 (patch) | |
| tree | e07abee023de8f5726652441fba491ae06cb2c7f /src/if.c | |
| parent | 31fce8253991eb0f2d02bb7dbeeecb617b60b979 (diff) | |
| download | dhcpcd-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.c | 13 |
1 files changed, 4 insertions, 9 deletions
@@ -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); |
