From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59944) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XOpy4-0005Gr-75 for qemu-devel@nongnu.org; Tue, 02 Sep 2014 11:26:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XOpxx-0000XL-4L for qemu-devel@nongnu.org; Tue, 02 Sep 2014 11:26:00 -0400 Received: from mail-we0-f169.google.com ([74.125.82.169]:55440) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XOpxw-0000X3-HH for qemu-devel@nongnu.org; Tue, 02 Sep 2014 11:25:53 -0400 Received: by mail-we0-f169.google.com with SMTP id k48so7140591wev.14 for ; Tue, 02 Sep 2014 08:25:51 -0700 (PDT) From: David Marchand Date: Tue, 2 Sep 2014 17:25:25 +0200 Message-Id: <1409671532-12706-8-git-send-email-david.marchand@6wind.com> In-Reply-To: <1409671532-12706-1-git-send-email-david.marchand@6wind.com> References: <1409671532-12706-1-git-send-email-david.marchand@6wind.com> Subject: [Qemu-devel] [PATCH v4 07/14] contrib/ivshmem-*: add missing const and static attrs List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kvm@vger.kernel.org, stefanha@gmail.com, claudio.fontana@huawei.com, armbru@redhat.com, arei.gonglei@huawei.com, pbonzini@redhat.com, jani.kokkonen@huawei.com, cam@cs.ualberta.ca Signed-off-by: David Marchand --- 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