Lines Matching refs:msg
75 static ssize_t check_response(struct storage_msg* msg, ssize_t res) { in check_response() argument
79 if ((size_t)res < sizeof(*msg)) { in check_response()
80 TLOGE("invalid msg length (%zd < %zd)\n", (size_t)res, sizeof(*msg)); in check_response()
86 switch (msg->result) { in check_response()
88 return res - sizeof(*msg); in check_response()
112 TLOGE("cmd 0x%x: is unhandles command\n", msg->cmd); in check_response()
116 TLOGE("cmd 0x%x: internal server error\n", msg->cmd); in check_response()
120 TLOGE("cmd 0x%x: unhandled server response %u\n", msg->cmd, in check_response()
121 msg->result); in check_response()
202 static int wait_to_send(handle_t session, struct ipc_msg* msg) { in wait_to_send() argument
213 return send_msg(session, msg); in wait_to_send()
277 struct storage_msg msg = {.cmd = STORAGE_FILE_OPEN, in storage_open_file() local
280 struct iovec tx[3] = {{&msg, sizeof(msg)}, in storage_open_file()
284 struct iovec rx[2] = {{&msg, sizeof(msg)}, {&rsp, sizeof(rsp)}}; in storage_open_file()
287 rc = check_response(&msg, rc); in storage_open_file()
301 struct storage_msg msg = {.cmd = STORAGE_FILE_CLOSE}; in storage_close_file() local
303 struct iovec tx[2] = {{&msg, sizeof(msg)}, {&req, sizeof(req)}}; in storage_close_file()
304 struct iovec rx[1] = {{&msg, sizeof(msg)}}; in storage_close_file()
307 rc = check_response(&msg, rc); in storage_close_file()
321 struct storage_msg msg = { in storage_move_file() local
331 {&msg, sizeof(msg)}, in storage_move_file()
336 struct iovec rx[1] = {{&msg, sizeof(msg)}}; in storage_move_file()
339 return (int)check_response(&msg, rc); in storage_move_file()
345 struct storage_msg msg = {.cmd = STORAGE_FILE_DELETE, in storage_delete_file() local
350 struct iovec tx[3] = {{&msg, sizeof(msg)}, in storage_delete_file()
353 struct iovec rx[1] = {{&msg, sizeof(msg)}}; in storage_delete_file()
356 return (int)check_response(&msg, rc); in storage_delete_file()
396 struct storage_msg msg = {.cmd = STORAGE_FILE_LIST}; in storage_read_dir_send_message() local
399 {&msg, sizeof(msg)}, in storage_read_dir_send_message()
403 struct iovec rx[2] = {{&msg, sizeof(msg)}, in storage_read_dir_send_message()
414 rc = check_response(&msg, rc); in storage_read_dir_send_message()
480 struct storage_msg msg = {.cmd = STORAGE_FILE_READ}; in _read_chunk() local
487 {&msg, sizeof(msg)}, in _read_chunk()
491 {&msg, sizeof(msg)}, in _read_chunk()
496 return check_response(&msg, rc); in _read_chunk()
529 struct storage_msg msg = { in _write_req() local
538 {&msg, sizeof(msg)}, {&req, sizeof(req)}, {(void*)buf, size}}; in _write_req()
539 struct iovec rx[1] = {{&msg, sizeof(msg)}}; in _write_req()
542 rc = check_response(&msg, rc); in _write_req()
581 struct storage_msg msg = {.cmd = STORAGE_FILE_SET_SIZE, in storage_set_file_size() local
587 struct iovec tx[2] = {{&msg, sizeof(msg)}, {&req, sizeof(req)}}; in storage_set_file_size()
588 struct iovec rx[1] = {{&msg, sizeof(msg)}}; in storage_set_file_size()
591 return (int)check_response(&msg, rc); in storage_set_file_size()
595 struct storage_msg msg = {.cmd = STORAGE_FILE_GET_SIZE}; in storage_get_file_size() local
599 struct iovec tx[2] = {{&msg, sizeof(msg)}, {&req, sizeof(req)}}; in storage_get_file_size()
601 struct iovec rx[2] = {{&msg, sizeof(msg)}, {&rsp, sizeof(rsp)}}; in storage_get_file_size()
604 rc = check_response(&msg, rc); in storage_get_file_size()
619 struct storage_msg msg = { in storage_end_transaction() local
623 struct iovec iov = {&msg, sizeof(msg)}; in storage_end_transaction()
626 return (int)check_response(&msg, rc); in storage_end_transaction()
630 struct storage_msg msg = { in storage_commit_checkpoint() local
635 struct iovec iov = {&msg, sizeof(msg)}; in storage_commit_checkpoint()
638 return (int)check_response(&msg, rc); in storage_commit_checkpoint()