Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/libbpftune.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ void bpftune_log_syslog(__attribute__((unused)) void *ctx, int level,

buflen = vsnprintf(buf, sizeof(buf), fmt, args);
if (buflen > 0)
syslog(level, buf, buflen + 1);
syslog(level, "%s", buf);
}

/* log to ctx buffer for specific thread, fall back to usual log destination */
Expand Down Expand Up @@ -811,7 +811,7 @@ struct bpftuner *bpftuner_init(const char *path)
tuner->id = bpftune_num_tuners;
tuner->state = BPFTUNE_ACTIVE;
bpftune_tuners[bpftune_num_tuners++] = tuner;
bpftune_log(LOG_DEBUG, "sucessfully initialized tuner %s[%d]\n",
bpftune_log(LOG_DEBUG, "successfully initialized tuner %s[%d]\n",
tuner->name, tuner->id);
return tuner;
}
Expand Down Expand Up @@ -1391,7 +1391,7 @@ int bpftuner_tunables_init(struct bpftuner *tuner, unsigned int num_descs,
for (i = 0; i < num_descs; i++) {
int num_values;

bpftune_log(LOG_DEBUG, "handling desc %ld/%ld\n", i, num_descs);
bpftune_log(LOG_DEBUG, "handling desc %u/%u\n", i, num_descs);
memcpy(&tuner->tunables[i].desc, &descs[i], sizeof(*descs));

if (descs[i].type != BPFTUNABLE_SYSCTL)
Expand All @@ -1414,7 +1414,7 @@ int bpftuner_tunables_init(struct bpftuner *tuner, unsigned int num_descs,
}
if (num_values != descs[i].num_values) {
bpftune_log(LOG_ERR, "error reading tunable '%s'; expected %d values, got %d\n",
descs[i].num_values, num_values);
descs[i].name, descs[i].num_values, num_values);
return -EINVAL;
}
if (descs[i].flags & BPFTUNABLE_STRING) {
Expand Down
2 changes: 1 addition & 1 deletion src/neigh_table_tuner.c
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ static int increase_or_decrease_thresh(struct bpftuner *tuner,
}
ret = nl_connect(sk, NETLINK_ROUTE);
if (ret) {
bpftune_log(LOG_ERR, "nl_connect() failed: %d\n",
bpftune_log(LOG_ERR, "nl_connect() failed: %s\n",
strerror(-ret));
goto out;
}
Expand Down