nbdkit_stdio_safe should return an int, but apart from that the rest
of the patch looked fine to me, except for:
On Sat, Apr 04, 2020 at 05:02:38PM -0500, Eric Blake wrote:
Also, treat 'nbdkit -s --dump-plugin' as an error, as
.dump_plugin is
supposed to interact with stdout.
diff --git a/server/main.c b/server/main.c
index 62598b81..748122fc 100644
--- a/server/main.c
+++ b/server/main.c
@@ -529,12 +529,13 @@ main (int argc, char *argv[])
(port && listen_stdin) ||
(unixsocket && listen_stdin) ||
(listen_stdin && run) ||
+ (listen_stdin && dump_plugin) ||
(vsock && unixsocket) ||
(vsock && listen_stdin) ||
(vsock && run)) {
fprintf (stderr,
- "%s: -p, --run, -s, -U or --vsock options cannot be used "
- "in this combination\n",
+ "%s: --dump-plugin, -p, --run, -s, -U or --vsock options "
+ "cannot be used in this combination\n",
program_name);
exit (EXIT_FAILURE);
}
I feel this would be better as a separate commit. It seems incidental
to the main thrust of this change.
Rich.
--
Richard Jones, Virtualization Group, Red Hat
http://people.redhat.com/~rjones
Read my programming and virtualization blog:
http://rwmj.wordpress.com
virt-p2v converts physical machines to virtual machines. Boot with a
live CD or over the network (PXE) and turn machines into KVM guests.
http://libguestfs.org/virt-v2v