Tomáš Golembiovský
2020-Jan-20 13:05 UTC
[Libguestfs] [PATCH] nbdkit: fix condition in probe_filter
The tests assume probe_filter returns true if the filter is available (and not the other way around). Signed-off-by: Tomáš Golembiovský <tgolembi@redhat.com> --- v2v/nbdkit.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v2v/nbdkit.ml b/v2v/nbdkit.ml index 77d2a506..00122bec 100644 --- a/v2v/nbdkit.ml +++ b/v2v/nbdkit.ml @@ -142,7 +142,7 @@ let common_create ?bandwidth plugin_name plugin_args plugin_env let cmd sprintf "%s nbdkit --dump-plugin --filter=%s null >/dev/null" env_as_string filter_name in - Sys.command cmd <> 0 + Sys.command cmd == 0 in (* Adding the readahead filter is always a win for our access -- 2.24.1
Richard W.M. Jones
2020-Jan-21 08:10 UTC
Re: [Libguestfs] [PATCH] nbdkit: fix condition in probe_filter
On Mon, Jan 20, 2020 at 02:05:41PM +0100, Tomáš Golembiovský wrote:> The tests assume probe_filter returns true if the filter is available > (and not the other way around). > > Signed-off-by: Tomáš Golembiovský <tgolembi@redhat.com> > --- > v2v/nbdkit.ml | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/v2v/nbdkit.ml b/v2v/nbdkit.ml > index 77d2a506..00122bec 100644 > --- a/v2v/nbdkit.ml > +++ b/v2v/nbdkit.ml > @@ -142,7 +142,7 @@ let common_create ?bandwidth plugin_name plugin_args plugin_env > let cmd > sprintf "%s nbdkit --dump-plugin --filter=%s null >/dev/null" > env_as_string filter_name in > - Sys.command cmd <> 0 > + Sys.command cmd == 0 > inThanks - now I'm wonder how this worked at all before ... I've pushed this. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-df lists disk usage of guests without needing to install any software inside the virtual machine. Supports Linux and Windows. http://people.redhat.com/~rjones/virt-df/
Richard W.M. Jones
2020-Jan-21 12:07 UTC
Re: [Libguestfs] [PATCH] nbdkit: fix condition in probe_filter
On Mon, Jan 20, 2020 at 02:05:41PM +0100, Tomáš Golembiovský wrote:> The tests assume probe_filter returns true if the filter is available > (and not the other way around). > > Signed-off-by: Tomáš Golembiovský <tgolembi@redhat.com> > --- > v2v/nbdkit.ml | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/v2v/nbdkit.ml b/v2v/nbdkit.ml > index 77d2a506..00122bec 100644 > --- a/v2v/nbdkit.ml > +++ b/v2v/nbdkit.ml > @@ -142,7 +142,7 @@ let common_create ?bandwidth plugin_name plugin_args plugin_env > let cmd > sprintf "%s nbdkit --dump-plugin --filter=%s null >/dev/null" > env_as_string filter_name in > - Sys.command cmd <> 0 > + Sys.command cmd == 0 > inFYI: https://github.com/libguestfs/nbdkit/commit/daaac81a83e3347f6a9c95679f2556952a0a5ade 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
Reasonably Related Threads
- [PATCH v2v v2] nbdkit: Use cacheextents if possible for vddk input
- [PATCH v4 00/12] v2v: Change virt-v2v to use nbdkit for input in several modes.
- [PATCH 00/11] v2v: Change virt-v2v to use nbdkit for input in several modes.
- [PATCH v3 00/12] v2v: Change virt-v2v to use nbdkit for input in several modes.
- [PATCH v2 00/11] v2v: Change virt-v2v to use nbdkit for input in several modes.