From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43937) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aftoF-0006rJ-Ct for qemu-devel@nongnu.org; Tue, 15 Mar 2016 14:35:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aftoC-0001x9-0Z for qemu-devel@nongnu.org; Tue, 15 Mar 2016 14:35:11 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47149) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aftoB-0001wN-OI for qemu-devel@nongnu.org; Tue, 15 Mar 2016 14:35:07 -0400 From: Markus Armbruster Date: Tue, 15 Mar 2016 19:34:55 +0100 Message-Id: <1458066895-20632-41-git-send-email-armbru@redhat.com> In-Reply-To: <1458066895-20632-1-git-send-email-armbru@redhat.com> References: <1458066895-20632-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 v3 40/40] 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 5afa8ee..dc64a18 100644 --- a/contrib/ivshmem-server/main.c +++ b/contrib/ivshmem-server/main.c @@ -200,6 +200,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