projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Pass more arguments to fio_init_net_cmd()
[fio.git]
/
client.c
diff --git
a/client.c
b/client.c
index d9e3857ee05e264d8ee8beb0ca2e0a4bc14a4083..f9154648cbbb4c7e1921e57cd7e90cae5e3852e5 100644
(file)
--- 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);
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);
fio_net_cmd_crc(cmd);
ret = fio_send_data(fio_client_fd, cmd, sizeof(*cmd) + size);