logdebugx("reading standard input");
sbytes = read(fileno(stdin), buf.buf, sizeof(buf.buf));
} else {
- logdebugx("%s: reading lease `%s'",
+ logdebugx("%s: reading lease: %s",
ifp->name, state->leasefile);
sbytes = dhcp_readfile(ifp->ctx, state->leasefile,
buf.buf, sizeof(buf.buf));
state->state = DHS_BOUND;
if (!state->lease.frominfo &&
!(ifo->options & (DHCPCD_INFORM | DHCPCD_STATIC))) {
- logdebugx("%s: writing lease `%s'",
+ logdebugx("%s: writing lease: %s",
ifp->name, state->leasefile);
if (dhcp_writefile(ifp->ctx, state->leasefile, 0640,
state->new, state->new_len) == -1)
print_string(sname, sizeof(sname), OT_STRING | OT_DOMAIN,
bootp->sname, sizeof(bootp->sname));
if (a == NULL)
- logmessage(loglevel, "%s: %s %s %s `%s'",
+ logmessage(loglevel, "%s: %s %s %s %s",
ifp->name, msg, tfrom, inet_ntoa(addr), sname);
else
- logmessage(loglevel, "%s: %s %s %s %s `%s'",
+ logmessage(loglevel, "%s: %s %s %s %s %s",
ifp->name, msg, a, tfrom, inet_ntoa(addr), sname);
} else {
if (r != 0) {
logdebugx("reading standard input");
bytes = read(fileno(stdin), buf.buf, sizeof(buf.buf));
} else {
- logdebugx("%s: reading lease `%s'",
+ logdebugx("%s: reading lease: %s",
ifp->name, state->leasefile);
bytes = dhcp_readfile(ifp->ctx, state->leasefile,
buf.buf, sizeof(buf.buf));
ifp->name, state->expire);
rt_build(ifp->ctx, AF_INET6);
if (!confirmed && !timedout) {
- logdebugx("%s: writing lease `%s'",
+ logdebugx("%s: writing lease: %s",
ifp->name, state->leasefile);
if (dhcp_writefile(ifp->ctx, state->leasefile, 0640,
state->new, state->new_len) == -1)
"/tmp/dhcp6.reply%d.raw", replyn++);
fd = open(fname, O_RDONLY, 0);
if (fd == -1) {
- logerr("%s: open `%s'", __func__, fname);
+ logerr("%s: open: %s", __func__, fname);
return;
}
tlen = read(fd, tbuf, sizeof(tbuf));
if (tlen == -1)
- logerr("%s: read `%s'", __func__, fname);
+ logerr("%s: read: %s", __func__, fname);
close(fd);
/* Copy across ServerID so we can work with our own server. */
return;
}
- loginfox("%s: connected to Access Point `%s'", ifp->name, pssid);
+ loginfox("%s: connected to Access Point: %s", ifp->name, pssid);
}
void
}
if (chdir("/") == -1)
- logerr("%s: chdir `/'", __func__);
+ logerr("%s: chdir: /", __func__);
/* Freeing allocated addresses from dumping leases can trigger
* eloop removals as well, so init here. */
if (!(ctx.options & DHCPCD_TEST)) {
/* Ensure we have the needed directories */
if (mkdir(DBDIR, 0750) == -1 && errno != EEXIST)
- logerr("%s: mkdir `%s'", __func__, DBDIR);
+ logerr("%s: mkdir: %s", __func__, DBDIR);
if (mkdir(RUNDIR, 0755) == -1 && errno != EEXIST)
- logerr("%s: mkdir `%s'", __func__, RUNDIR);
+ logerr("%s: mkdir: %s", __func__, RUNDIR);
if ((pid = pidfile_lock(ctx.pidfile)) != 0) {
if (pid == -1)
logerr("%s: pidfile_lock: %s",
if (e != 0 ||
(net != NULL && inet_cidrtoaddr((int)i, net) != 0))
{
- logerrx("`%s' is not a valid CIDR", p);
+ logerrx("invalid CIDR: %s", p);
return -1;
}
}
if (addr != NULL && inet_aton(arg, addr) == 0) {
- logerrx("`%s' is not a valid IP address", arg);
+ logerrx("invalid IP address: %s", arg);
return -1;
}
if (p != NULL)
make_option_mask(d, dl, od, odl, no, arg, -1) != 0 ||
make_option_mask(d, dl, od, odl, reject, arg, -1) != 0)
{
- logerrx("unknown option `%s'", arg);
+ logerrx("unknown option: %s", arg);
return -1;
}
break;
make_option_mask(d, dl, od, odl, request, arg, -1) != 0 ||
make_option_mask(d, dl, od, odl, require, arg, -1) != 0)
{
- logerrx("unknown option `%s'", arg);
+ logerrx("unknown option: %s", arg);
return -1;
}
break;
else if (strcmp(arg, "disable") == 0)
ifo->fqdn = FQDN_DISABLE;
else {
- logerrx("invalid value `%s' for FQDN", arg);
+ logerrx("invalid FQDN value: %s", arg);
return -1;
}
break;
make_option_mask(d, dl, od, odl, require, arg, -1) != 0 ||
make_option_mask(d, dl, od, odl, no, arg, 1) != 0)
{
- logerrx("unknown option `%s'", arg);
+ logerrx("unknown option: %s", arg);
return -1;
}
break;
make_option_mask(d, dl, od, odl, no, arg, -1) != 0 ||
make_option_mask(d, dl, od, odl, reject, arg, -1) != 0)
{
- logerrx("unknown option `%s'", arg);
+ logerrx("unknown option: %s", arg);
return -1;
}
break;
ifo->dstmask, arg, 2) != 0)
{
if (errno == EINVAL)
- logerrx("option `%s' does not take"
- " an IPv4 address", arg);
+ logerrx("option does not take"
+ " an IPv4 address: %s", arg);
else
- logerrx("unknown option `%s'", arg);
+ logerrx("unknown option: %s", arg);
return -1;
}
break;
return -1;
}
if (l && !(t & (OT_STRING | OT_BINHEX))) {
- logwarnx("ignoring length for type `%s'", arg);
+ logwarnx("ignoring length for type: %s", arg);
l = 0;
}
if (t & OT_ARRAY && t & (OT_STRING | OT_BINHEX) &&
struct passwd *pw = ctx->ps_user;
if (!(ctx->options & DHCPCD_FORKED))
- logdebugx("chrooting to `%s' as %s", pw->pw_dir, pw->pw_name);
+ logdebugx("chrooting as %s to %s", pw->pw_name, pw->pw_dir);
if (chroot(pw->pw_dir) == -1 &&
(errno != EPERM || ctx->options & DHCPCD_FORKED))
- logerr("%s: chroot `%s'", __func__, pw->pw_dir);
+ logerr("%s: chroot: %s", __func__, pw->pw_dir);
if (chdir("/") == -1)
- logerr("%s: chdir `/'", __func__);
+ logerr("%s: chdir: /", __func__);
if ((setgroups(1, &pw->pw_gid) == -1 ||
setgid(pw->pw_gid) == -1 ||
argv[0] = ctx->script;
argv[1] = NULL;
- logdebugx("%s: executing `%s' %s", ifp->name, argv[0], reason);
+ logdebugx("%s: executing: %s %s", ifp->name, argv[0], reason);
#ifdef PRIVSEP
if (ctx->options & DHCPCD_PRIVSEP) {