From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48907) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ai6gV-0000Zq-Be for qemu-devel@nongnu.org; Mon, 21 Mar 2016 16:44:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ai6gS-0000sc-Fp for qemu-devel@nongnu.org; Mon, 21 Mar 2016 16:44:19 -0400 Received: from mx1.redhat.com ([209.132.183.28]:48775) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ai6gR-0000rr-UN for qemu-devel@nongnu.org; Mon, 21 Mar 2016 16:44:16 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (Postfix) with ESMTPS id 815F7804EB for ; Mon, 21 Mar 2016 20:44:15 +0000 (UTC) Received: from blackfin.pond.sub.org (ovpn-116-41.ams2.redhat.com [10.36.116.41]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u2LKiCKw015566 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Mon, 21 Mar 2016 16:44:14 -0400 From: Markus Armbruster Date: Mon, 21 Mar 2016 21:44:03 +0100 Message-Id: <1458593043-31731-41-git-send-email-armbru@redhat.com> In-Reply-To: <1458593043-31731-1-git-send-email-armbru@redhat.com> References: <1458593043-31731-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] [PULL v2 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 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 Message-Id: <1458066895-20632-41-git-send-email-armbru@redhat.com> --- 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