diff options
-rw-r--r-- | src/knot/ctl/knotc_main.c | 32 | ||||
-rw-r--r-- | src/knot/ctl/process.c | 2 | ||||
-rw-r--r-- | src/knot/ctl/remote.c | 6 | ||||
-rw-r--r-- | src/knot/dnssec/zone-events.c | 6 | ||||
-rw-r--r-- | src/knot/main.c | 10 | ||||
-rw-r--r-- | src/knot/nameserver/update.c | 43 | ||||
-rw-r--r-- | src/knot/server/net.c | 2 | ||||
-rw-r--r-- | src/knot/server/server.c | 6 | ||||
-rw-r--r-- | src/knot/zone/events.c | 4 | ||||
-rw-r--r-- | src/knot/zone/semantic-check.c | 10 | ||||
-rw-r--r-- | src/knot/zone/zone-load.c | 9 | ||||
-rw-r--r-- | src/knot/zone/zonefile.c | 8 | ||||
-rw-r--r-- | src/libknot/packet/pkt.c | 8 | ||||
-rw-r--r-- | src/libknot/tsig-op.c | 2 | ||||
-rw-r--r-- | src/utils/common/params.c | 6 | ||||
-rw-r--r-- | src/utils/nsupdate/nsupdate_exec.c | 2 |
16 files changed, 77 insertions, 79 deletions
diff --git a/src/knot/ctl/knotc_main.c b/src/knot/ctl/knotc_main.c index 522466de4..d882106d7 100644 --- a/src/knot/ctl/knotc_main.c +++ b/src/knot/ctl/knotc_main.c @@ -190,7 +190,7 @@ static int cmd_remote(const char *cmd, uint16_t rrt, int argc, char *argv[]) /* Make query. */ knot_pkt_t *pkt = remote_query(cmd, r->key); if (!pkt) { - log_warning("could not prepare query for '%s'", cmd); + log_warning("failed to prepare query for '%s'", cmd); return 1; } @@ -200,7 +200,7 @@ static int cmd_remote(const char *cmd, uint16_t rrt, int argc, char *argv[]) knot_rrset_t rr; int res = remote_build_rr(&rr, "data.", rrt); if (res != KNOT_EOK) { - log_error("couldn't create the query"); + log_error("failed to create the query"); knot_pkt_free(&pkt); return 1; } @@ -217,7 +217,7 @@ static int cmd_remote(const char *cmd, uint16_t rrt, int argc, char *argv[]) } res = knot_pkt_put(pkt, 0, &rr, KNOT_PF_FREE); if (res != KNOT_EOK) { - log_error("couldn't create the query"); + log_error("failed to create the query"); knot_rrset_clear(&rr, NULL); knot_pkt_free(&pkt); return 1; @@ -227,7 +227,7 @@ static int cmd_remote(const char *cmd, uint16_t rrt, int argc, char *argv[]) if (r->key) { int res = remote_query_sign(pkt->wire, &pkt->size, pkt->max_size, r->key); if (res != KNOT_EOK) { - log_error("couldn't sign the packet"); + log_error("failed to sign the packet"); knot_pkt_free(&pkt); return 1; } @@ -241,7 +241,7 @@ static int cmd_remote(const char *cmd, uint16_t rrt, int argc, char *argv[]) int s = net_connected_socket(SOCK_STREAM, &r->addr, &r->via, 0); if (s < 0) { - log_error("couldn't connect to remote host '%s'", addr_str); + log_error("failed to connect to remote host '%s'", addr_str); knot_pkt_free(&pkt); return 1; } @@ -249,7 +249,7 @@ static int cmd_remote(const char *cmd, uint16_t rrt, int argc, char *argv[]) /* Wait for availability. */ struct pollfd pfd = { s, POLLOUT, 0 }; if (poll(&pfd, 1, conf()->max_conn_reply) != 1) { - log_error("couldn't connect to remote host '%s'", addr_str); + log_error("failed to connect to remote host '%s'", addr_str); close(s); knot_pkt_free(&pkt); return 1; @@ -261,7 +261,7 @@ static int cmd_remote(const char *cmd, uint16_t rrt, int argc, char *argv[]) /* Evaluate and wait for reply. */ if (ret <= 0) { - log_error("couldn't connect to remote host '%s'", addr_str); + log_error("failed to connect to remote host '%s'", addr_str); close(s); return 1; } @@ -272,8 +272,8 @@ static int cmd_remote(const char *cmd, uint16_t rrt, int argc, char *argv[]) ret = cmd_remote_reply(s); if (ret != KNOT_EOK) { if (ret != KNOT_ECONN) { - log_warning("remote command reply: %s", - knot_strerror(ret)); + log_notice("remote command reply: %s", + knot_strerror(ret)); rc = 1; } break; @@ -373,7 +373,7 @@ static int tsig_parse_file(knot_tsig_key_t *k, const char *f) { FILE* fp = fopen(f, "r"); if (!fp) { - log_error("couldn't open key-file '%s'", f); + log_error("failed to open key-file '%s'", f); return KNOT_EINVAL; } @@ -455,14 +455,14 @@ int main(int argc, char **argv) case 'y': if (tsig_parse_str(&r_key, optarg) != KNOT_EOK) { rc = 1; - log_error("couldn't parse TSIG key '%s'", optarg); + log_error("failed to parse TSIG key '%s'", optarg); goto exit; } break; case 'k': if (tsig_parse_file(&r_key, optarg) != KNOT_EOK) { rc = 1; - log_error("couldn't parse TSIG key file '%s'", optarg); + log_error("failed to parse TSIG key file '%s'", optarg); goto exit; } break; @@ -525,7 +525,7 @@ int main(int argc, char **argv) /* Check if config file is required. */ if (has_flag(flags, F_NOCONF) && cmd->need_conf) { - log_error("couldn't find a config file, refusing to continue"); + log_error("failed to find a config file, refusing to continue"); rc = 1; goto exit; } @@ -654,7 +654,7 @@ static int cmd_checkconf(int argc, char *argv[], unsigned flags) UNUSED(argv); UNUSED(flags); - log_info("OK, configuration is valid"); + log_info("configuration is valid"); return 0; } @@ -719,7 +719,7 @@ static int cmd_checkzone(int argc, char *argv[], unsigned flags) continue; } - log_zone_str_info(zone->name, "zone is OK"); + log_zone_str_info(zone->name, "zone is valid"); zone_contents_deep_free(&loaded_zone); } hattrie_iter_free(z_iter); @@ -774,7 +774,7 @@ static int cmd_memstats(int argc, char *argv[], unsigned flags) process_error, &est); if (zs == NULL) { - log_zone_str_error(zone->name, "could not load zone"); + log_zone_str_error(zone->name, "failed to load zone"); hattrie_free(est.node_table); continue; } diff --git a/src/knot/ctl/process.c b/src/knot/ctl/process.c index 024cccb07..bac6fc2af 100644 --- a/src/knot/ctl/process.c +++ b/src/knot/ctl/process.c @@ -221,7 +221,7 @@ char *pid_check_and_create() /* Create a PID file. */ int ret = pid_write(pidfile); if (ret != KNOT_EOK) { - log_error("couldn't create a PID file '%s'", pidfile); + log_error("failed to create a PID file '%s'", pidfile); free(pidfile); return NULL; } diff --git a/src/knot/ctl/remote.c b/src/knot/ctl/remote.c index 08037ef78..fda72b0e3 100644 --- a/src/knot/ctl/remote.c +++ b/src/knot/ctl/remote.c @@ -433,7 +433,7 @@ int remote_bind(conf_iface_t *desc) /* Start listening. */ int ret = listen(sock, TCP_BACKLOG_SIZE); if (ret < 0) { - log_error("could not bind to '%s'", addr_str); + log_error("failed to bind to '%s'", addr_str); close(sock); return ret; } @@ -476,7 +476,7 @@ int remote_recv(int sock, struct sockaddr_storage *addr, uint8_t *buf, { int c = tcp_accept(sock); if (c < 0) { - dbg_server("remote: couldn't accept incoming connection\n"); + dbg_server("remote: failed to accept incoming connection\n"); return c; } @@ -774,7 +774,7 @@ int remote_process(server_t *s, conf_iface_t *ctl_if, int sock, /* Accept incoming connection and read packet. */ int client = remote_recv(sock, &ss, pkt->wire, &buflen); if (client < 0) { - dbg_server("remote: couldn't receive query = %d\n", client); + dbg_server("remote: failed to receive query = %d\n", client); knot_pkt_free(&pkt); return client; } else { diff --git a/src/knot/dnssec/zone-events.c b/src/knot/dnssec/zone-events.c index 767715d40..d64e87bc4 100644 --- a/src/knot/dnssec/zone-events.c +++ b/src/knot/dnssec/zone-events.c @@ -92,7 +92,7 @@ static int zone_sign(zone_contents_t *zone, const conf_zone_t *zone_config, result = knot_zone_create_nsec_chain(zone, out_ch, &zone_keys, &policy); if (result != KNOT_EOK) { - log_zone_error(zone_name, "DNSSEC, could not create NSEC(3) chain (%s)", + log_zone_error(zone_name, "DNSSEC, failed to create NSEC(3) chain (%s)", knot_strerror(result)); knot_free_zone_keys(&zone_keys); return result; @@ -104,7 +104,7 @@ static int zone_sign(zone_contents_t *zone, const conf_zone_t *zone_config, result = knot_zone_sign(zone, &zone_keys, &policy, out_ch, refresh_at); if (result != KNOT_EOK) { - log_zone_error(zone_name, "DNSSEC, zone sign failed (%s)", + log_zone_error(zone_name, "DNSSEC, failed to sign the zone (%s)", knot_strerror(result)); knot_free_zone_keys(&zone_keys); return result; @@ -128,7 +128,7 @@ static int zone_sign(zone_contents_t *zone, const conf_zone_t *zone_config, result = knot_zone_sign_update_soa(&soa, &rrsigs, &zone_keys, &policy, new_serial, out_ch); if (result != KNOT_EOK) { - log_zone_error(zone_name, "DNSSEC, not signing, cannot update " + log_zone_error(zone_name, "DNSSEC, not signing, failed to update " "SOA record (%s)", knot_strerror(result)); knot_free_zone_keys(&zone_keys); return result; diff --git a/src/knot/main.c b/src/knot/main.c index 507cb4405..720d0ed47 100644 --- a/src/knot/main.c +++ b/src/knot/main.c @@ -114,7 +114,7 @@ static void setup_capabilities(void) /* Apply. */ if (capng_apply(CAPNG_SELECT_BOTH) < 0) { - log_error("couldn't set process capabilities (%s)", + log_error("failed to set process capabilities (%s)", strerror(errno)); } } else { @@ -267,7 +267,7 @@ int main(int argc, char **argv) int res = conf_open(config_fn); conf_t *config = conf(); if (res != KNOT_EOK) { - log_fatal("couldn't load configuration file '%s' (%s)", + log_fatal("failed to load configuration file '%s' (%s)", config_fn, knot_strerror(res)); return EXIT_FAILURE; } @@ -281,7 +281,7 @@ int main(int argc, char **argv) server_t server; res = server_init(&server, conf_bg_threads(config)); if (res != KNOT_EOK) { - log_fatal("could not initialize server (%s)", knot_strerror(res)); + log_fatal("failed to initialize server (%s)", knot_strerror(res)); conf_free(conf()); log_close(); return EXIT_FAILURE; @@ -318,7 +318,7 @@ int main(int argc, char **argv) log_info("PID stored in '%s'", pidfile); if (chdir(daemon_root) != 0) { - log_warning("can't change working directory to %s", + log_warning("failed to change working directory to %s", daemon_root); } else { log_info("changed directory to %s", daemon_root); @@ -361,7 +361,7 @@ int main(int argc, char **argv) if (daemonize) { log_info("server started as a daemon, PID %ld", pid); } else { - log_info("server started in foreground, PID %ld", pid); + log_info("server started in the foreground, PID %ld", pid); init_signal_started(); } diff --git a/src/knot/nameserver/update.c b/src/knot/nameserver/update.c index 63842e946..b8212a8bf 100644 --- a/src/knot/nameserver/update.c +++ b/src/knot/nameserver/update.c @@ -124,7 +124,7 @@ static int check_prereqs(struct request_data *request, knot_wire_set_rcode(request->resp->wire, rcode); return ret; } - + return KNOT_EOK; } @@ -165,7 +165,7 @@ static int process_bulk(zone_t *zone, list_t *requests, changeset_t *ddns_ch) // Init zone update structure. zone_update_t zone_update; zone_update_init(&zone_update, zone->contents, ddns_ch); - + // Walk all the requests and process. struct request_data *req; WALK_LIST(req, *requests) { @@ -174,24 +174,24 @@ static int process_bulk(zone_t *zone, list_t *requests, changeset_t *ddns_ch) param.remote = &req->remote; struct query_data qdata; init_qdata_from_request(&qdata, zone, req, ¶m); - + store_original_qname(&qdata, req->query); process_query_qname_case_lower(req->query); - + int ret = check_prereqs(req, zone, &zone_update, &qdata); if (ret != KNOT_EOK) { // Skip updates with failed prereqs. continue; } - + ret = process_single_update(req, zone, &zone_update, &qdata); if (ret != KNOT_EOK) { return ret; } - + process_query_qname_case_restore(&qdata, req->query); } - + return KNOT_EOK; } @@ -206,7 +206,7 @@ static int process_normal(zone_t *zone, list_t *requests) set_rcodes(requests, KNOT_RCODE_SERVFAIL); return ret; } - + // Process all updates. ret = process_bulk(zone, requests, &ddns_ch); if (ret != KNOT_EOK) { @@ -214,14 +214,14 @@ static int process_normal(zone_t *zone, list_t *requests) set_rcodes(requests, KNOT_RCODE_SERVFAIL); return ret; } - + zone_contents_t *new_contents = NULL; const bool change_made = !changeset_empty(&ddns_ch); if (!change_made) { changeset_clear(&ddns_ch); return KNOT_EOK; } - + // Apply changes. ret = apply_changeset(zone, &ddns_ch, &new_contents); if (ret != KNOT_EOK) { @@ -314,7 +314,7 @@ static int process_requests(zone_t *zone, list_t *requests) /* Evaluate response. */ const uint32_t new_serial = zone_contents_serial(zone->contents); if (new_serial == old_serial) { - log_zone_info(zone->name, "DDNS, no change to zone made"); + log_zone_info(zone->name, "DDNS, finished, no changes to the zone were made"); return KNOT_EOK; } @@ -322,7 +322,7 @@ static int process_requests(zone_t *zone, list_t *requests) log_zone_info(zone->name, "DDNS, update finished, serial %u -> %u, " "%.02f seconds", old_serial, new_serial, time_diff(&t_start, &t_end) / 1000.0); - + zone_events_schedule(zone, ZONE_EVENT_NOTIFY, ZONE_EVENT_NOW); return KNOT_EOK; @@ -374,11 +374,10 @@ static int forward_request(zone_t *zone, struct request_data *request) /* Set RCODE if forwarding failed. */ if (ret != KNOT_EOK) { knot_wire_set_rcode(request->resp->wire, KNOT_RCODE_SERVFAIL); - log_zone_error(zone->name, "DDNS, " - "failed to forward updates to master (%s)", + log_zone_error(zone->name, "DDNS, failed to forward updates to the master (%s)", knot_strerror(ret)); } else { - log_zone_info(zone->name, "DDNS, updates forwarded"); + log_zone_info(zone->name, "DDNS, updates forwarded to the master"); } return ret; @@ -409,10 +408,10 @@ static bool update_tsig_check(struct query_data *qdata, struct request_data *req return false; } } - + // Store signing context for response. req->sign = qdata->sign; - + return true; } @@ -433,10 +432,10 @@ static void send_update_response(const zone_t *zone, struct request_data *req) // Sign the response with TSIG where applicable struct query_data qdata; init_qdata_from_request(&qdata, zone, req, NULL); - + (void)process_query_sign_response(req->resp, &qdata); } - + if (net_is_connected(req->fd)) { tcp_send_msg(req->fd, req->resp->wire, req->resp->size); } else { @@ -474,12 +473,12 @@ static int init_update_responses(const zone_t *zone, list_t *updates, // Don't check TSIG for forwards. continue; } - + struct process_query_param param = { 0 }; param.remote = &req->remote; struct query_data qdata; init_qdata_from_request(&qdata, zone, req, ¶m); - + if (!update_tsig_check(&qdata, req)) { // ACL/TSIG check failed, send response. send_update_response(zone, req); @@ -537,7 +536,7 @@ int updates_execute(zone_t *zone) send_update_responses(zone, &updates); return ret; } - + if (update_count == 0) { /* All updates failed their ACL checks. */ return KNOT_EOK; diff --git a/src/knot/server/net.c b/src/knot/server/net.c index 12df7e594..f4d363a71 100644 --- a/src/knot/server/net.c +++ b/src/knot/server/net.c @@ -57,7 +57,7 @@ int net_unbound_socket(int type, const struct sockaddr_storage *ss) /* Create socket. */ int socket = socket_create(ss->ss_family, type, 0); if (socket < 0) { - log_error("could not create socket '%s' (%s)", + log_error("failed to create socket '%s' (%s)", addr_str, knot_strerror(socket)); return socket; } diff --git a/src/knot/server/server.c b/src/knot/server/server.c index 26068f9a7..d36ddd57a 100644 --- a/src/knot/server/server.c +++ b/src/knot/server/server.c @@ -451,7 +451,7 @@ int server_reload(server_t *server, const char *cf) conf()->filename); break; default: - log_error("configuration reload failed"); + log_error("failed to reload the configuration"); break; } @@ -526,7 +526,7 @@ static int reconfigure_rate_limits(const struct conf_t *conf, server_t *server) if (!server->rrl && conf->rrl > 0) { server->rrl = rrl_create(conf->rrl_size); if (!server->rrl) { - log_error("couldn't initialize rate limiting table"); + log_error("failed to initialize rate limiting table"); } else { rrl_setlocks(server->rrl, RRL_LOCK_GRANULARITY); } @@ -538,7 +538,7 @@ static int reconfigure_rate_limits(const struct conf_t *conf, server_t *server) if (conf->rrl < 1) { log_info("rate limiting, disabled"); } else { - log_info("rate limiting, enabled %u responses/second", + log_info("rate limiting, enabled with %u responses/second", conf->rrl); } rrl_setrate(server->rrl, conf->rrl); diff --git a/src/knot/zone/events.c b/src/knot/zone/events.c index f1e3e0882..92d1d7a52 100644 --- a/src/knot/zone/events.c +++ b/src/knot/zone/events.c @@ -515,7 +515,7 @@ static int event_dnssec(zone_t *zone) zone_contents_t *new_contents = NULL; int ret = apply_changeset(zone, &ch, &new_contents); if (ret != KNOT_EOK) { - log_zone_error(zone->name, "DNSSEC, could not sign zone (%s)", + log_zone_error(zone->name, "DNSSEC, failed to sign zone (%s)", knot_strerror(ret)); goto done; } @@ -523,7 +523,7 @@ static int event_dnssec(zone_t *zone) /* Write change to journal. */ ret = zone_change_store(zone, &ch); if (ret != KNOT_EOK) { - log_zone_error(zone->name, "DNSSEC, could not sign zone (%s)", + log_zone_error(zone->name, "DNSSEC, failed to sign zone (%s)", knot_strerror(ret)); update_rollback(&ch); update_free_zone(&new_contents); diff --git a/src/knot/zone/semantic-check.c b/src/knot/zone/semantic-check.c index 636f1161c..12931df6e 100644 --- a/src/knot/zone/semantic-check.c +++ b/src/knot/zone/semantic-check.c @@ -85,7 +85,7 @@ static char *error_messages[(-ZC_ERR_UNKNOWN) + 1] = { [-ZC_ERR_NSEC3_UNSECURED_DELEGATION] = "NSEC3, zone contains unsecured delegation", [-ZC_ERR_NSEC3_NOT_FOUND] = - "NSEC3, could not find previous NSEC3 record in the zone", + "NSEC3, failed to find previous NSEC3 record in the zone", [-ZC_ERR_NSEC3_UNSECURED_DELEGATION_OPT] = "NSEC3, unsecured delegation is not part of the opt-out span", [-ZC_ERR_NSEC3_RDATA_TTL] = @@ -169,7 +169,7 @@ static void log_error_from_node(err_handler_t *handler, const knot_dname_t *zone_name = zone->apex->owner; if (error > (int)ZC_ERR_GLUE_RECORD) { - log_zone_warning(zone_name, "sematic check, unknown error"); + log_zone_warning(zone_name, "semantic check, unknown error"); return; } @@ -463,7 +463,7 @@ static int check_rrsig_in_rrset(err_handler_t *handler, int ret = check_rrsig_rdata(handler, zone, node, &rrsigs, i, rrset, dnskey_rrset); if (ret != KNOT_EOK) { - dbg_semcheck("could not check RRSIG properly (%s)", + dbg_semcheck("failed to check RRSIG properly (%s)", knot_strerror(ret)); break; } @@ -1073,8 +1073,8 @@ void log_cyclic_errors_in_zone(err_handler_t *handler, next_dname_size, apex->owner); if (next_dname == NULL) { - log_zone_warning(zone->apex->owner, "sematic check, " - "could not create new dname"); + log_zone_warning(zone->apex->owner, "semantic check, " + "failed to create new dname"); return; } diff --git a/src/knot/zone/zone-load.c b/src/knot/zone/zone-load.c index 9082c5e67..eefafb95c 100644 --- a/src/knot/zone/zone-load.c +++ b/src/knot/zone/zone-load.c @@ -110,7 +110,7 @@ int zone_load_journal(zone_t *zone, zone_contents_t *contents) /* Apply changesets. */ ret = apply_changesets_directly(contents, &chgs); - log_zone_info(zone->name, "serial %u -> %u (%s)", + log_zone_info(zone->name, "changes from journal applied %u -> %u (%s)", serial, zone_contents_serial(contents), knot_strerror(ret)); @@ -168,14 +168,13 @@ int zone_load_post(zone_contents_t *contents, zone_t *zone, uint32_t *dnssec_ref } ret = zone_contents_create_diff(zone->contents, contents, &change); if (ret == KNOT_ENODIFF) { - log_zone_warning(zone->name, "cannot create journal " + log_zone_warning(zone->name, "failed to create journal " "entry, zone file changed without " - "SOA serial update"); + "SOA serial update"); ret = KNOT_EOK; } else if (ret == KNOT_ERANGE) { log_zone_warning(zone->name, "IXFR history will be lost, " - "zone file changed with SOA serial " - "decreased"); + "zone file changed, but SOA serial decreased"); ret = KNOT_EOK; } else if (ret != KNOT_EOK) { log_zone_error(zone->name, "failed to calculate " diff --git a/src/knot/zone/zonefile.c b/src/knot/zone/zonefile.c index fd6808829..3a4a3b962 100644 --- a/src/knot/zone/zonefile.c +++ b/src/knot/zone/zonefile.c @@ -166,7 +166,7 @@ static void scanner_process(zs_scanner_t *scanner) if (ret != KNOT_EOK) { char *rr_name = knot_dname_to_str(rr.owner); const knot_dname_t *zname = zc->z->apex->owner; - ERROR(zname, "cannot add RDATA, file '%s', line %"PRIu64", owner '%s'", + ERROR(zname, "failed to add RDATA, file '%s', line %"PRIu64", owner '%s'", scanner->file.name, scanner->line_counter, rr_name); free(rr_name); knot_dname_free(&owner, NULL); @@ -252,19 +252,19 @@ zone_contents_t *zonefile_load(zloader_t *loader) assert(zc); int ret = zs_scanner_parse_file(loader->scanner, loader->source); if (ret != 0 && loader->scanner->error_counter == 0) { - ERROR(zname, "could not load zone, file '%s' (%s)", + ERROR(zname, "failed to load zone, file '%s' (%s)", loader->source, zs_strerror(loader->scanner->error_code)); goto fail; } if (zc->ret != KNOT_EOK) { - ERROR(zname, "could not load zone, file '%s' (%s)", + ERROR(zname, "failed to load zone, file '%s' (%s)", loader->source, knot_strerror(zc->ret)); goto fail; } if (loader->scanner->error_counter > 0) { - ERROR(zname, "could not load zone, file '%s', %"PRIu64"errors", + ERROR(zname, "failed to load zone, file '%s', %"PRIu64"errors", loader->source, loader->scanner->error_counter); goto fail; } diff --git a/src/libknot/packet/pkt.c b/src/libknot/packet/pkt.c index 00f3e0998..37b1e6556 100644 --- a/src/libknot/packet/pkt.c +++ b/src/libknot/packet/pkt.c @@ -647,7 +647,7 @@ static int knot_pkt_rr_from_wire(const uint8_t *wire, size_t *pos, int ret = knot_rrset_rdata_from_wire_one(rrset, wire, pos, size, ttl, rdlength, mm); if (ret != KNOT_EOK) { - dbg_packet("%s: couldn't parse RDATA (%d)\n", __func__, ret); + dbg_packet("%s: failed to parse RDATA (%d)\n", __func__, ret); knot_rrset_clear(rrset, mm); return ret; } @@ -752,7 +752,7 @@ int knot_pkt_parse_section(knot_pkt_t *pkt, unsigned flags) for (rr_parsed = 0; rr_parsed < rr_count; ++rr_parsed) { ret = knot_pkt_parse_rr(pkt, flags); if (ret != KNOT_EOK) { - dbg_packet("%s: couldn't parse RR %u/%u = %d\n", + dbg_packet("%s: failed to parse RR %u/%u = %d\n", __func__, rr_parsed, rr_count, ret); return ret; } @@ -776,13 +776,13 @@ int knot_pkt_parse_payload(knot_pkt_t *pkt, unsigned flags) for (knot_section_t i = KNOT_ANSWER; i <= KNOT_ADDITIONAL; ++i) { ret = knot_pkt_begin(pkt, i); if (ret != KNOT_EOK) { - dbg_packet("%s: couldn't begin section %u = %d\n", + dbg_packet("%s: failed to begin section %u = %d\n", __func__, i, ret); return ret; } ret = knot_pkt_parse_section(pkt, flags); if (ret != KNOT_EOK) { - dbg_packet("%s: couldn't parse section %u = %d\n", + dbg_packet("%s: failed to parse section %u = %d\n", __func__, i, ret); return ret; } diff --git a/src/libknot/tsig-op.c b/src/libknot/tsig-op.c index 60bb9e628..59935a80c 100644 --- a/src/libknot/tsig-op.c +++ b/src/libknot/tsig-op.c @@ -498,7 +498,7 @@ int knot_tsig_sign(uint8_t *msg, size_t *msg_len, digest_tmp, &digest_tmp_len, tmp_tsig, key); if (ret != KNOT_EOK) { - dbg_tsig("TSIG: could not create wire or sign wire: %s\n", + dbg_tsig("TSIG: failed to create wire or sign wire: %s\n", knot_strerror(ret)); knot_rrset_free(&tmp_tsig, NULL); return ret; diff --git a/src/utils/common/params.c b/src/utils/common/params.c index b0d7d6366..3e308834c 100644 --- a/src/utils/common/params.c +++ b/src/utils/common/params.c @@ -392,7 +392,7 @@ int params_parse_tsig(const char *value, knot_key_params_t *key_params) /* Invalidate previous key. */ if (key_params->name) { - ERR("Key specified multiple times.\n"); + ERR("key specified multiple times.\n"); return KNOT_EINVAL; } @@ -457,13 +457,13 @@ int params_parse_keyfile(const char *value, knot_key_params_t *key_params) } if (key_params->name) { - ERR("Key specified multiple times.\n"); + ERR("key specified multiple times.\n"); return KNOT_EINVAL; } int result = knot_load_key_params(value, key_params); if (result != KNOT_EOK) { - ERR("could not read key file: %s\n", knot_strerror(result)); + ERR("failed to read key file: %s\n", knot_strerror(result)); return KNOT_EINVAL; } diff --git a/src/utils/nsupdate/nsupdate_exec.c b/src/utils/nsupdate/nsupdate_exec.c index a4e36b155..58b543c62 100644 --- a/src/utils/nsupdate/nsupdate_exec.c +++ b/src/utils/nsupdate/nsupdate_exec.c @@ -532,7 +532,7 @@ int nsupdate_exec(nsupdate_params_t *params) } FILE *fp = fopen(filename, "r"); if (!fp) { - ERR("could not open '%s': %s\n", + ERR("failed to open '%s': %s\n", filename, strerror(errno)); return KNOT_ERROR; } |