Don't log backticks.

This commit is contained in:
Roy Marples 2020-10-03 17:17:45 +01:00
parent 984496259f
commit 3f8b1832bf
6 changed files with 27 additions and 27 deletions

View File

@ -1164,7 +1164,7 @@ read_lease(struct interface *ifp, struct bootp **bootp)
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));
@ -2314,7 +2314,7 @@ dhcp_bind(struct interface *ifp)
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)
@ -2865,10 +2865,10 @@ log_dhcp(int loglevel, const char *msg,
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) {

View File

@ -2588,7 +2588,7 @@ dhcp6_readlease(struct interface *ifp, int validate)
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));
@ -3218,7 +3218,7 @@ dhcp6_bind(struct interface *ifp, const char *op, const char *sfrom)
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)
@ -3657,12 +3657,12 @@ dhcp6_recvmsg(struct dhcpcd_ctx *ctx, struct msghdr *msg, struct ipv6_addr *ia)
"/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. */

View File

@ -698,7 +698,7 @@ dhcpcd_reportssid(struct interface *ifp)
return;
}
loginfox("%s: connected to Access Point `%s'", ifp->name, pssid);
loginfox("%s: connected to Access Point: %s", ifp->name, pssid);
}
void
@ -2066,7 +2066,7 @@ printpidfile:
}
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. */
@ -2223,9 +2223,9 @@ printpidfile:
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",

View File

@ -460,13 +460,13 @@ parse_addr(struct in_addr *addr, struct in_addr *net, const char *arg)
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)
@ -788,7 +788,7 @@ parse_option(struct dhcpcd_ctx *ctx, const char *ifname, struct if_options *ifo,
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;
@ -800,7 +800,7 @@ parse_option(struct dhcpcd_ctx *ctx, const char *ifname, struct if_options *ifo,
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;
@ -1017,7 +1017,7 @@ parse_option(struct dhcpcd_ctx *ctx, const char *ifname, struct if_options *ifo,
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;
@ -1063,7 +1063,7 @@ parse_option(struct dhcpcd_ctx *ctx, const char *ifname, struct if_options *ifo,
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;
@ -1076,7 +1076,7 @@ parse_option(struct dhcpcd_ctx *ctx, const char *ifname, struct if_options *ifo,
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;
@ -1313,10 +1313,10 @@ parse_option(struct dhcpcd_ctx *ctx, const char *ifname, struct if_options *ifo,
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;
@ -1799,7 +1799,7 @@ err_sla:
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) &&

View File

@ -117,12 +117,12 @@ ps_dropprivs(struct dhcpcd_ctx *ctx)
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 ||

View File

@ -736,7 +736,7 @@ script_runreason(const struct interface *ifp, const char *reason)
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) {