[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v4 07/14] contrib/ivshmem-*: add missing const and s
From: |
David Marchand |
Subject: |
[Qemu-devel] [PATCH v4 07/14] contrib/ivshmem-*: add missing const and static attrs |
Date: |
Tue, 2 Sep 2014 17:25:25 +0200 |
Signed-off-by: David Marchand <address@hidden>
---
contrib/ivshmem-client/main.c | 6 +++---
contrib/ivshmem-server/main.c | 8 ++++----
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/contrib/ivshmem-client/main.c b/contrib/ivshmem-client/main.c
index f8a7b66..a8e1586 100644
--- a/contrib/ivshmem-client/main.c
+++ b/contrib/ivshmem-client/main.c
@@ -15,7 +15,7 @@
typedef struct IvshmemClientArgs {
bool verbose;
- char *unix_sock_path;
+ const char *unix_sock_path;
} IvshmemClientArgs;
/* show usage and exit with given error code */
@@ -129,7 +129,7 @@ handle_stdin_command(IvshmemClient *client)
/* listen on stdin (command line), on unix socket (notifications of new
* and dead peers), and on eventfd (IRQ request) */
-int
+static int
poll_events(IvshmemClient *client)
{
fd_set fds;
@@ -172,7 +172,7 @@ poll_events(IvshmemClient *client)
}
/* callback when we receive a notification (just display it) */
-void
+static void
notification_cb(const IvshmemClient *client, const IvshmemClientPeer *peer,
unsigned vect, void *arg)
{
diff --git a/contrib/ivshmem-server/main.c b/contrib/ivshmem-server/main.c
index f00e6f9..1966e71 100644
--- a/contrib/ivshmem-server/main.c
+++ b/contrib/ivshmem-server/main.c
@@ -22,9 +22,9 @@
typedef struct IvshmemServerArgs {
bool verbose;
bool foreground;
- char *pid_file;
- char *unix_socket_path;
- char *shm_path;
+ const char *pid_file;
+ const char *unix_socket_path;
+ const char *shm_path;
size_t shm_size;
unsigned n_vectors;
} IvshmemServerArgs;
@@ -138,7 +138,7 @@ parse_args(IvshmemServerArgs *args, int argc, char *argv[])
/* wait for events on listening server unix socket and connected client
* sockets */
-int
+static int
poll_events(IvshmemServer *server)
{
fd_set fds;
--
1.7.10.4
- [Qemu-devel] [PATCH v4 02/14] docs: update ivshmem device spec, (continued)
- [Qemu-devel] [PATCH v4 02/14] docs: update ivshmem device spec, David Marchand, 2014/09/02
- [Qemu-devel] [PATCH v4 03/14] contrib/ivshmem-*: comply with QEMU coding style, David Marchand, 2014/09/02
- [Qemu-devel] [PATCH v4 04/14] contrib/ivshmem-*: reuse qemu/queue.h, David Marchand, 2014/09/02
- [Qemu-devel] [PATCH v4 01/14] contrib: add ivshmem client and server, David Marchand, 2014/09/02
- [Qemu-devel] [PATCH v4 05/14] contrib/ivshmem-*: switch to QEMU headers, David Marchand, 2014/09/02
- [Qemu-devel] [PATCH v4 06/14] contrib/ivshmem-server: set client sockets as non blocking, David Marchand, 2014/09/02
- [Qemu-devel] [PATCH v4 08/14] contrib/ivshmem-*: plug client and server in QEMU top Makefile, David Marchand, 2014/09/02
- [Qemu-devel] [PATCH v4 07/14] contrib/ivshmem-*: add missing const and static attrs,
David Marchand <=
- [Qemu-devel] [PATCH v4 09/14] contrib/ivshmem-*: switch to g_malloc0/g_free, David Marchand, 2014/09/02
- [Qemu-devel] [PATCH v4 10/14] contrib/ivshmem-server: fix mem leak on error, David Marchand, 2014/09/02
- [Qemu-devel] [PATCH v4 11/14] contrib/ivshmem-*: rework error handling, David Marchand, 2014/09/02
- [Qemu-devel] [PATCH v4 12/14] contrib/ivshmem-*: various fixes, David Marchand, 2014/09/02
- [Qemu-devel] [PATCH v4 13/14] contrib/ivshmem-server: align server default parameter values, David Marchand, 2014/09/02
- [Qemu-devel] [PATCH v4 14/14] ivshmem: add check on protocol version in QEMU, David Marchand, 2014/09/02
- Re: [Qemu-devel] [PATCH v4 00/14] ivshmem: update documentation, add client/server tools, Eric Blake, 2014/09/02