From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44961) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ad0nE-0004L9-FG for qemu-devel@nongnu.org; Mon, 07 Mar 2016 14:26:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ad0n9-00041X-Db for qemu-devel@nongnu.org; Mon, 07 Mar 2016 14:26:12 -0500 Received: from mx1.redhat.com ([209.132.183.28]:39268) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ad0n9-000411-49 for qemu-devel@nongnu.org; Mon, 07 Mar 2016 14:26:07 -0500 From: Markus Armbruster Date: Mon, 7 Mar 2016 20:25:54 +0100 Message-Id: <1457378754-21649-43-git-send-email-armbru@redhat.com> In-Reply-To: <1457378754-21649-1-git-send-email-armbru@redhat.com> References: <1457378754-21649-1-git-send-email-armbru@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH v2 42/42] 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 Reviewed-by: Marc-Andr=C3=A9 Lureau --- 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 2795db5..bebc32b 100644 --- a/contrib/ivshmem-server/main.c +++ b/contrib/ivshmem-server/main.c @@ -214,6 +214,12 @@ main(int argc, char *argv[]) }; int ret =3D 1; =20 + /* + * 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); =20 --=20 2.4.3