X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=client.c;h=f9154648cbbb4c7e1921e57cd7e90cae5e3852e5;hp=d9e3857ee05e264d8ee8beb0ca2e0a4bc14a4083;hb=4d8f87806db144552baea60d9b59e9becffe5925;hpb=a781480e959e4cad32f27915bdb5dab948aa1c6e diff --git a/client.c b/client.c index d9e3857e..f9154648 100644 --- a/client.c +++ b/client.c @@ -62,12 +62,7 @@ static int send_file_buf(char *buf, off_t size) cmd = malloc(sizeof(*cmd) + size); - fio_init_net_cmd(cmd); - cmd->opcode = cpu_to_le16(FIO_NET_CMD_JOB_END); - cmd->pdu_len = cpu_to_le32(size); - - memcpy(&cmd->payload, buf, size); - + fio_init_net_cmd(cmd, FIO_NET_CMD_JOB_END, buf, size); fio_net_cmd_crc(cmd); ret = fio_send_data(fio_client_fd, cmd, sizeof(*cmd) + size);