This takes Rich's API proposal and starts fleshing it out with enough
meat that I was able to test 'nbdkit eval' advertising multiple
exports with descriptions paired with 'qemu-nbd --list'.
Eric Blake (3):
server: Add exports list functions
server: Prepare to use export list from plugin
sh, eval: Add .list_exports support
Richard W.M. Jones (1):
server: Implement list_exports.
docs/nbdkit-plugin.pod | 57 +++++++++-
docs/nbdkit-protocol.pod | 7 +-
plugins/eval/nbdkit-eval-plugin.pod | 2 +
plugins/sh/nbdkit-sh-plugin.pod | 31 ++++++
include/nbdkit-common.h | 4 +
include/nbdkit-filter.h | 12 +++
include/nbdkit-plugin.h | 3 +
server/Makefile.am | 2 +
tests/Makefile.am | 2 +
server/internal.h | 6 ++
common/utils/cleanup.h | 3 +
server/backend.c | 22 ++++
server/exports.c | 150 +++++++++++++++++++++++++++
server/filters.c | 9 ++
server/nbdkit.syms | 5 +
server/plugins.c | 15 +++
server/protocol-handshake-newstyle.c | 80 ++++++++------
server/protocol-handshake.c | 24 +++++
common/utils/cleanup-nbdkit.c | 6 ++
plugins/sh/methods.h | 4 +-
plugins/eval/eval.c | 2 +
plugins/sh/methods.c | 91 ++++++++++++++++
plugins/sh/sh.c | 1 +
plugins/sh/example.sh | 8 ++
tests/test-eval-exports.sh | 65 ++++++++++++
25 files changed, 570 insertions(+), 41 deletions(-)
create mode 100644 server/exports.c
create mode 100755 tests/test-eval-exports.sh
--
2.28.0