Received: from eggs.gnu.org ([2001:4830:134:3::10]:59931) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aaSkq-0002JJ-Pb for qemu-devel@nongnu.org; Mon, 29 Feb 2016 13:41:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aaSkk-0007uq-5W for qemu-devel@nongnu.org; Mon, 29 Feb 2016 13:41:12 -0500 Received: from mx1.redhat.com ([209.132.183.28]:53715) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aaSkj-0007ua-UW for qemu-devel@nongnu.org; Mon, 29 Feb 2016 13:41:06 -0500 From: Markus Armbruster Date: Mon, 29 Feb 2016 19:40:54 +0100 Message-Id: <1456771254-17511-39-git-send-email-armbru@redhat.com> In-Reply-To: <1456771254-17511-1-git-send-email-armbru@redhat.com> References: <1456771254-17511-1-git-send-email-armbru@redhat.com> Subject: [Qemu-devel] [PATCH 38/38] contrib/ivshmem-server: Print "not for production" warning List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: claudio.fontana@huawei.com, cam@cs.ualberta.ca, mlureau@redhat.com, david.marchand@6wind.com, pbonzini@redhat.com The code is okay for illustrating how things work and for testing, but its error handling make it unfit for production use. Print a warning to protect the innocent. Signed-off-by: Markus Armbruster --- contrib/ivshmem-server/main.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/contrib/ivshmem-server/main.c b/contrib/ivshmem-server/main.c index cca1061..97488dc 100644 --- a/contrib/ivshmem-server/main.c +++ b/contrib/ivshmem-server/main.c @@ -197,6 +197,12 @@ main(int argc, char *argv[]) }; int ret = 1; + /* + * Do not remove this notice without adding proper error handling! + * Start with handling ivshmem_server_send_one_msg() failure. + */ + printf("*** Example code, do not use in production ***\n"); + /* parse arguments, will exit on error */ ivshmem_server_parse_args(&args, argc, argv); -- 2.4.3