contrib/ivshmem-server: Print "not for production" warning
authorMarkus Armbruster <armbru@redhat.com>
Tue, 15 Mar 2016 18:34:55 +0000 (19:34 +0100)
committerMarkus Armbruster <armbru@redhat.com>
Mon, 21 Mar 2016 20:29:03 +0000 (21:29 +0100)
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 <armbru@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <1458066895-20632-41-git-send-email-armbru@redhat.com>

contrib/ivshmem-server/main.c

index 5afa8eef1130cee99f483ea440cfe01d4574f2a4..dc64a1832cec37f20cacfed97a5ba1528c305d08 100644 (file)
@@ -200,6 +200,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);