sname = server_name(client, buf, sizeof(buf));
memset(pdu.server, 0, sizeof(pdu.server));
- strncpy((char *) pdu.server, sname, sizeof(pdu.server) - 1);
+ snprintf((char *) pdu.server, sizeof(pdu.server), "%s", sname);
fio_net_send_cmd(client->fd, FIO_NET_CMD_PROBE, &pdu, sizeof(pdu), &tag, &client->cmd_list);
}
memset(addr, 0, sizeof(*addr));
addr->sun_family = AF_UNIX;
- strncpy(addr->sun_path, client->hostname, sizeof(addr->sun_path) - 1);
+ snprintf(addr->sun_path, sizeof(addr->sun_path), "%s",
+ client->hostname);
fd = socket(AF_UNIX, SOCK_STREAM, 0);
if (fd < 0) {
__log_buf(&client->buf, "\nDisk stats (read/write):\n");
print_disk_util(&du->dus, &du->agg, 0, &client->buf);
}
- if (output_format & FIO_OUTPUT_TERSE && terse_version >= 3)
+ if (output_format & FIO_OUTPUT_TERSE && terse_version >= 3) {
print_disk_util(&du->dus, &du->agg, 1, &client->buf);
+ __log_buf(&client->buf, "\n");
+ }
}
static void convert_jobs_eta(struct jobs_eta *je)