Eric Blake
2018-Jan-17 22:14 UTC
Re: [Libguestfs] [PATCH 4/9] backend: Add a .plugin_name method.
On 01/17/2018 02:53 PM, Richard W.M. Jones wrote:> This returns the plugin name, which for plugins is the same as the > ordinary .name method (but for filters will be different). > ---Just as .name and .plugin_name can differ for filters, should we also have a way to report independent version numbers (via .version) for the filter, compared to the version of the underlying plugin (via .plugin_version)?> +++ b/src/plugins.c > @@ -465,6 +465,7 @@ static struct backend plugin_functions = { > .free = plugin_free, > .thread_model = plugin_thread_model, > .name = plugin_name, > + .plugin_name = plugin_name, > .usage = plugin_usage, > .version = plugin_version, > .dump_fields = plugin_dump_fields, >-- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org
Richard W.M. Jones
2018-Jan-18 09:09 UTC
Re: [Libguestfs] [PATCH 4/9] backend: Add a .plugin_name method.
On Wed, Jan 17, 2018 at 04:14:56PM -0600, Eric Blake wrote:> On 01/17/2018 02:53 PM, Richard W.M. Jones wrote: > > This returns the plugin name, which for plugins is the same as the > > ordinary .name method (but for filters will be different). > > --- > > Just as .name and .plugin_name can differ for filters, should we also > have a way to report independent version numbers (via .version) for the > filter, compared to the version of the underlying plugin (via > .plugin_version)?As it currently stands it's not necessary because main.c does: if (version) { const char *v; struct backend *b; display_version (); for_each_backend (b) { printf ("%s", b->name (b)); if ((v = b->version (b)) != NULL) printf (" %s", v); printf ("\n"); } exit (EXIT_SUCCESS); } with the output: $ ./nbdkit --filter offset --filter delay file --version nbdkit 1.1.26 offset 1.1.26 delay 1.1.26 file 1.1.26 Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com Fedora Windows cross-compiler. Compile Windows programs, test, and build Windows installers. Over 100 libraries supported. http://fedoraproject.org/wiki/MinGW
Eric Blake
2018-Jan-18 14:21 UTC
Re: [Libguestfs] [PATCH 4/9] backend: Add a .plugin_name method.
On 01/18/2018 03:09 AM, Richard W.M. Jones wrote:> On Wed, Jan 17, 2018 at 04:14:56PM -0600, Eric Blake wrote: >> On 01/17/2018 02:53 PM, Richard W.M. Jones wrote: >>> This returns the plugin name, which for plugins is the same as the >>> ordinary .name method (but for filters will be different). >>> --- >> >> Just as .name and .plugin_name can differ for filters, should we also >> have a way to report independent version numbers (via .version) for the >> filter, compared to the version of the underlying plugin (via >> .plugin_version)? > > As it currently stands it's not necessary because main.c does:...> with the output: > > $ ./nbdkit --filter offset --filter delay file --version > nbdkit 1.1.26 > offset 1.1.26 > delay 1.1.26 > file 1.1.26And if we argue that filters do not have ABI guarantees, where newer nbdkit will refuse to run with an older filter file (for fear that the older filter will not properly munge all the new features supported in the newer plugin), then the version of filters may be less important (the filter can't even load if it is not the same ABI version as supported in the nbdkit version). -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org
Possibly Parallel Threads
- Re: [PATCH 4/9] backend: Add a .plugin_name method.
- [PATCH 4/9] backend: Add a .plugin_name method.
- [PATCH 2/9] Refactor plugin_* functions into a backend struct.
- [PATCH nbdkit 2/3] Refactor plugin_* functions into a backend struct.
- [PATCH nbdkit v2 2/3] Refactor plugin_* functions into a backend struct.