aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Levon <john.levon@nutanix.com>2021-03-31 18:43:00 +0100
committerGitHub <noreply@github.com>2021-03-31 18:43:00 +0100
commit5e6cd316c19f2d0a29a692bd16757ca7030b9774 (patch)
treea115fe1d066e4d825eb97159f2143f0472a13ad1
parent1808ebe180890895d8f1a47d5496c60eaa5bb8d8 (diff)
downloadlibvfio-user-5e6cd316c19f2d0a29a692bd16757ca7030b9774.zip
libvfio-user-5e6cd316c19f2d0a29a692bd16757ca7030b9774.tar.gz
libvfio-user-5e6cd316c19f2d0a29a692bd16757ca7030b9774.tar.bz2
make some tran_sock functions static (#409)
Signed-off-by: John Levon <john.levon@nutanix.com> Reviewed-by: Thanos Makatos <thanos.makatos@nutanix.com>
-rw-r--r--lib/tran_sock.c7
-rw-r--r--lib/tran_sock.h16
2 files changed, 5 insertions, 18 deletions
diff --git a/lib/tran_sock.c b/lib/tran_sock.c
index 268b2b4..4acde3b 100644
--- a/lib/tran_sock.c
+++ b/lib/tran_sock.c
@@ -140,7 +140,10 @@ tran_sock_send(int sock, uint16_t msg_id, bool is_reply,
ARRAY_SIZE(iovecs), NULL, 0, 0);
}
-int
+/*
+ * Send an empty reply back to the other end with the given errno.
+ */
+static int
tran_sock_send_error(int sock, uint16_t msg_id,
enum vfio_user_command cmd,
int error)
@@ -204,7 +207,7 @@ get_msg(void *data, size_t len, int *fds, size_t *nr_fds, int sock_fd,
* when we're going to return > 0 on success, and even then "errno" might be
* better.
*/
-int
+static int
tran_sock_recv_fds(int sock, struct vfio_user_header *hdr, bool is_reply,
uint16_t *msg_id, void *data, size_t *len, int *fds,
size_t *nr_fds)
diff --git a/lib/tran_sock.h b/lib/tran_sock.h
index eb7658b..ecf8bf8 100644
--- a/lib/tran_sock.h
+++ b/lib/tran_sock.h
@@ -72,13 +72,6 @@ tran_sock_send(int sock, uint16_t msg_id, bool is_reply,
enum vfio_user_command cmd, void *data, size_t data_len);
/*
- * Send an empty reply back to the other end with the given errno.
- */
-int
-tran_sock_send_error(int sock, uint16_t msg_id,
- enum vfio_user_command cmd, int error);
-
-/*
* Receive a message from the other end, and place the data into the given
* buffer. If data is supplied by the other end, it must be exactly *len in
* size.
@@ -88,15 +81,6 @@ tran_sock_recv(int sock, struct vfio_user_header *hdr, bool is_reply,
uint16_t *msg_id, void *data, size_t *len);
/*
- * Same as tran_sock_recv except it receives passed file descriptors. See
- * tran_sock_msg on the semantics of @fds and @nr_fds.
- */
-int
-tran_sock_recv_fds(int sock, struct vfio_user_header *hdr, bool is_reply,
- uint16_t *msg_id, void *data, size_t *len, int *fds,
- size_t *nr_fds);
-
-/*
* Receive a message from the other end, but automatically allocate a buffer for
* it, which must be freed by the caller. If there is no data, *datap is set to
* NULL.