Re: [Libguestfs] [nbdkit] Two POSIX questions for you ...

2023-10-10 Thread Laszlo Ersek
: > +# https://listman.redhat.com/archives/libguestfs/2023-October/032767.html > +BASH_VERSION=no requires /bin/sh -c 'test "x$BASH_VERSION" != "xno"' > + > if ! nbdinfo --help | grep -- --map ; then > echo "$0: nbdinfo --map option required

Re: [Libguestfs] [nbdkit] Two POSIX questions for you ...

2023-10-09 Thread Laszlo Ersek
On 10/9/23 13:12, Richard W.M. Jones wrote: > On Mon, Oct 09, 2023 at 12:57:14PM +0200, Laszlo Ersek wrote: >> On 10/9/23 09:46, Richard W.M. Jones wrote: >>> Hi Eric, a couple of POSIX questions for you from nbdkit. >>> >>> The first question is from an AU

Re: [Libguestfs] [nbdkit] Two POSIX questions for you ...

2023-10-09 Thread Laszlo Ersek
On 10/9/23 09:46, Richard W.M. Jones wrote: > Hi Eric, a couple of POSIX questions for you from nbdkit. > > The first question is from an AUR comment on nbdkit: > > https://aur.archlinux.org/packages/nbdkit#comment-937381 > > I think there's a bash-ism in the logscript parameter in this test:

Re: [Libguestfs] [libnbd PATCH 2/2] info: Show human sizes for block_size values

2023-10-08 Thread Laszlo Ersek
ferred=32k 1M ] | grep pref >> >> this changes pre-patch: >> block_size_preferred: 32768 >> to post-patch: >> block_size_preferred: 32768 (32K) > > I think info/nbdinfo.pod needs to be updated. Good catch! With that: series Reviewed-by: Laszlo Ersek >

Re: [Libguestfs] [PATCH virt-v2v] -it ssh: Double quote ssh command which tests remote file exists

2023-10-02 Thread Laszlo Ersek
ssh command > where it is still required. > > See: https://github.com/libguestfs/virt-v2v/issues/35 > Thanks: Laszlo Ersek for diagnosis and suggesting the fix > Reported-by: Bill Sanders > --- > input/parse_domain_from_vmx.ml | 6 +- > 1 file changed, 5 ins

Re: [Libguestfs] [PATCH v2v 5/5] convert: Find out if Windows guest is expected BIOS set to localtime

2023-09-25 Thread Laszlo Ersek
- gcaps_bios_utc = true; > + gcaps_bios_utc = bios_utc; > } in > > guestcaps > diff --git a/tests/test-v2v-i-ova.xml b/tests/test-v2v-i-ova.xml > index a41827bfd5..fa7b4dbfc5 100644 > --- a/tests/test-v2v-i-ova.xml > +++ b/tests/test-v2v-i-ova.xml > @@ -18,7 +18,7 @@ > > hvm > > - > + >destroy >restart >restart With the BIOS -> RTC typo (?) fixed everywhere: series Reviewed-by: Laszlo Ersek ___ Libguestfs mailing list Libguestfs@redhat.com https://listman.redhat.com/mailman/listinfo/libguestfs

Re: [Libguestfs] [PATCH v2v 0/5] convert: Find out if Windows guest is expecting BIOS localtime or UTC

2023-09-25 Thread Laszlo Ersek
On 9/25/23 17:48, Laszlo Ersek wrote: > On 9/25/23 16:04, Richard W.M. Jones wrote: >> [Alice: See patch 2] >> >> [This patch is a bit rough, it could do with better commit messages >> and some tests. Please test it to see if it solves the Windows >> conversion is

Re: [Libguestfs] [PATCH v2v 0/5] convert: Find out if Windows guest is expecting BIOS localtime or UTC

2023-09-25 Thread Laszlo Ersek
On 9/25/23 16:04, Richard W.M. Jones wrote: > [Alice: See patch 2] > > [This patch is a bit rough, it could do with better commit messages > and some tests. Please test it to see if it solves the Windows > conversion issue described in the thread below.] > > We currently do not set any field in

Re: [Libguestfs] [PATCH v2v 3/5] -o libvirt: Add to libvirt XML

2023-09-25 Thread Laszlo Ersek
On 9/25/23 16:04, Richard W.M. Jones wrote: > --- > output/create_libvirt_xml.ml | 10 -- > tests/test-v2v-i-ova.xml | 1 + > 2 files changed, 9 insertions(+), 2 deletions(-) > > diff --git a/output/create_libvirt_xml.ml b/output/create_libvirt_xml.ml > index 964acd25fd..f97272ca31 1

Re: [Libguestfs] nbdinfo default output [was: [libnbd PATCH v2 6/6] info: Tolerate missing size]

2023-09-23 Thread Laszlo Ersek
On 9/22/23 16:14, Eric Blake wrote: > On Fri, Sep 22, 2023 at 09:03:53AM -0500, Eric Blake wrote: $ ./run nbdinfo nbd://localhost protocol: newstyle-fixed without TLS, using extended packets ... block_size_maximum: 33554432 > > For the human-readable output, should we also b

Re: [Libguestfs] Fwd: virt-v2v creating image that does not install guest agent on first boot

2023-09-23 Thread Laszlo Ersek
area. >>>> >>>> It's 2.2.0-1 from Debian (12) bookworm. I've verified that it >>>> doesn't have any distro-specific patches. >>>> >>>> (https://salsa.debian.org/libvirt-team/virt-v2v/-/tree/debian/master/debian >>>>

Re: [Libguestfs] [libnbd PATCH v2 6/6] info: Tolerate missing size

2023-09-22 Thread Laszlo Ersek
quot;, size); > fprintf (fp, "\t\"export-size-str\": \"%s\"\n", size_str); > > if (last) Assuming the size is unavailable, the non-JSON output includes neither the numeric nor the human-readable size, whereas the JSON output still includes the human-readable size (as "unavailable"). Is this difference intentional? I'd have thought that the JSON output should similarly exclude the human-readable size string in case the size were not available -- consequently, there'd be no need for initializing "size_str" to "unavailable", because "size_str" would never be printed if the size were unavailable. If OTOH the behavior is intentional, then Reviewed-by: Laszlo Ersek ___ Libguestfs mailing list Libguestfs@redhat.com https://listman.redhat.com/mailman/listinfo/libguestfs

Re: [Libguestfs] [libnbd PATCH v2 5/6] block_status: Fix assertion on bad 64-bit block status reply

2023-09-22 Thread Laszlo Ersek
k.c > index 20407d91..5a31c192 100644 > --- a/generator/states-reply-chunk.c > +++ b/generator/states-reply-chunk.c > @@ -476,6 +476,7 @@ REPLY.CHUNK_REPLY.RECV_BS_HEADER: >if (h->bs_count != be32toh (h->sbuf.reply.payload.b

Re: [Libguestfs] [libnbd PATCH v2 4/6] block_status: Fix assertion with large server size

2023-09-22 Thread Laszlo Ersek
(a) the server directly sending a 0-length extent, and (b) len==0 resulting from a (series of) local truncation(s). A consequence of that however is that -- I think -- the commit message is inexact: > As before, we never > report a zero-length extent to the callback. Suggest to append: "except when the zero-length is encountered in the first extent, directly from the server, or as a result of client-side truncations". Because, both before and after the patch, we do seem to expose the len==0 extent, in case i==0. NB: I don't know *why* we report a zero-length extent if it is the very first extent (both before and after the patch). But, that's not particularly important; what's important is that the patch preserves, and consistently extends, that behavior. Reviewed-by: Laszlo Ersek ___ Libguestfs mailing list Libguestfs@redhat.com https://listman.redhat.com/mailman/listinfo/libguestfs

Re: [Libguestfs] [libnbd PATCH v2 3/6] api: Sanitize sizes larger than INT64_MAX

2023-09-22 Thread Laszlo Ersek
esult: Value too large for defined data type > > A more complex patch to qemu to mask that bit back off from the offset > parameter to NBD_CMD_READ/WRITE is also possible to explore behavior > of passing large offsets over the wire, although I don't show it here. > > All stable

Re: [Libguestfs] [PATCH libguestfs] daemon: Omit 'file -S' option on older distros that lack support

2023-09-21 Thread Laszlo Ersek
git a/daemon/filearch.ml b/daemon/filearch.ml > index 7c858129db..cf784f18a2 100644 > --- a/daemon/filearch.ml > +++ b/daemon/filearch.ml > @@ -128,7 +128,10 @@ and cpio_arch magic orig_path path = > | bin :: bins -> > let bin_path = tmpdir // bin in > if is_regular_file bin_path then ( > - let out = command "file" ["-zSb"; bin_path] in > + let file_options = > + sprintf "-z%sb" > + (if File_helper.file_has_S_option () then "S" else "") in > + let out = command "file" [file_options; bin_path] in > file_architecture_of_magic out orig_path bin_path > ) > else Reviewed-by: Laszlo Ersek Thanks! Laszlo ___ Libguestfs mailing list Libguestfs@redhat.com https://listman.redhat.com/mailman/listinfo/libguestfs

Re: [Libguestfs] regression: file does not understand the -S option

2023-09-21 Thread Laszlo Ersek
On 9/20/23 23:42, Olaf Hering wrote: > Recently a commit was added to call 'file -zSb' instead of 'file -zb'. > > This causes a regression on Leap 15 (but not on Tumbleweed), because > file 5.32 does not understand the -S option. > > How can this be fixed properly, to handle both cases either at

Re: [Libguestfs] [PATCH nbdkit] server: Move size parsing code (nbdkit_parse_size) to common/include

2023-09-06 Thread Laszlo Ersek
On 9/5/23 16:57, Eric Blake wrote: > On Tue, Sep 05, 2023 at 11:09:02AM +0100, Richard W.M. Jones wrote: +static inline int64_t +human_size_parse (const char *str, + const char **error, const char **pstr) +{ + int64_t size; + char *end; + uint6

Re: [Libguestfs] [PATCH libnbd 5/5] copy: Allow human sizes for --queue-size, --request-size, --sparse

2023-09-04 Thread Laszlo Ersek
for us: clarifies that 512 precisely is permitted ("between" is a bit murky there), plus prints UINT_MAX numerically. > exit (EXIT_FAILURE); >} > + sparse_size = i64; >break; > > case 'T': > diff --git a/copy/nbdcopy.h b/copy/nb

Re: [Libguestfs] [PATCH libnbd 4/5] Revert "copy, info: Include common/utils/human-size.h"

2023-09-04 Thread Laszlo Ersek
On 9/3/23 17:23, Richard W.M. Jones wrote: > This reverts commit XXX FILL IN LATER XXX > --- > copy/main.c | 2 +- > info/show.c | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) Reviewed-by: Laszlo Ersek > > diff --git a/copy/main.c b/copy/main.c > inde

Re: [Libguestfs] [PATCH libnbd 3/5] common: Combine human-size.h headers into one

2023-09-04 Thread Laszlo Ersek
--- > 6 files changed, 126 insertions(+), 208 deletions(-) Hopefully you won't get too many rebase conflicts here... Reviewed-by: Laszlo Ersek ___ Libguestfs mailing list Libguestfs@redhat.com https://listman.redhat.com/mailman/listinfo/libguestfs

Re: [Libguestfs] [PATCH libnbd 1/5] copy, info: Include common/utils/human-size.h

2023-09-04 Thread Laszlo Ersek
ot; > #include "nbdcopy.h" > diff --git a/info/show.c b/info/show.c > index 920bbb0a27..99b7b5b60a 100644 > --- a/info/show.c > +++ b/info/show.c > @@ -29,7 +29,7 @@ > #include > > #include "ansi-colours.h" > -#include "human-size.h&q

Re: [Libguestfs] [PATCH libnbd 2/5] common/include: Import the human_size_parse (nbdkit_parse_size) function

2023-09-04 Thread Laszlo Ersek
On 9/3/23 17:23, Richard W.M. Jones wrote: > This function is copied from nbdkit commit XXX [fill in after nbdkit > change is upstream] XXX Right, if you end up updating the nbdkit patch, please refresh this one. Reviewed-by: Laszlo Ersek

Re: [Libguestfs] [PATCH nbdkit] server: Move size parsing code (nbdkit_parse_size) to common/include

2023-09-04 Thread Laszlo Ersek
* 1024 * 1024 * 1024 * 1024 }, > + }; > + > + for (i = 0; i < ARRAY_SIZE (pairs); i++) { > +const char *error = NULL, *pstr = NULL; > +int64_t r; > + > +r = human_size_parse (pairs[i].str, &error, &pstr); > +if (r != pairs[i].res) { >

Re: [Libguestfs] [nbdkit PATCH] sh: Allow pwrite to not consume all data

2023-08-31 Thread Laszlo Ersek
On 8/31/23 11:47, Richard W.M. Jones wrote: > On Thu, Aug 31, 2023 at 11:12:59AM +0200, Laszlo Ersek wrote: >> On 8/31/23 10:02, Richard W.M. Jones wrote: >>> >>> On Wed, Aug 30, 2023 at 05:21:19PM -0500, Eric Blake wrote: >>>> I hit another transient fai

Re: [Libguestfs] [PATCH nbdkit] sh: In pwrite, allow scripts to ignore stdin

2023-08-31 Thread Laszlo Ersek
us to show that we *know* that we cover for the case when an EPIPE might not be a conscious decision from the child script. ... Hmmm, let me check something: #!/bin/bash ulimit -f 1 cat >f $ ./script f $ echo $? 153 $ kill -l 153 XFSZ Good! (This example simulates a subprocess

Re: [Libguestfs] [nbdkit PATCH] sh: Allow pwrite to not consume all data

2023-08-31 Thread Laszlo Ersek
On 8/31/23 10:02, Richard W.M. Jones wrote: > > On Wed, Aug 30, 2023 at 05:21:19PM -0500, Eric Blake wrote: >> I hit another transient failure in libnbd CI when a poorly-written >> eval script did not consume all of stdin during .pwrite. As behaving >> as a data sink can be a somewhat reasonable

Re: [Libguestfs] [nbdkit PATCH] sh: Allow pwrite to not consume all data

2023-08-31 Thread Laszlo Ersek
On 8/31/23 10:55, Richard W.M. Jones wrote: > On Thu, Aug 31, 2023 at 10:40:53AM +0200, Laszlo Ersek wrote: >> On 8/31/23 00:21, Eric Blake wrote: >>> I hit another transient failure in libnbd CI when a poorly-written >>> eval script did not consume all of stdin during .

Re: [Libguestfs] [nbdkit PATCH] sh: Allow pwrite to not consume all data

2023-08-31 Thread Laszlo Ersek
On 8/31/23 00:21, Eric Blake wrote: > I hit another transient failure in libnbd CI when a poorly-written > eval script did not consume all of stdin during .pwrite. As behaving > as a data sink can be a somewhat reasonable feature of a > quickly-written sh or eval plugin, we should not be so insist

Re: [Libguestfs] [libnbd PATCH v4 05/25] golang: Change logic of copy_uint32_array

2023-08-08 Thread Laszlo Ersek
of int. But we can equally just panic if the count is oversized: our >> state machine guarantees that the server's response fits within 64M >> bytes (count will be smaller than that, since it is multiple bytes >> per extent entry). > > Good to check this, but not rel

Re: [Libguestfs] [PATCH libnbd] copy/copy-file-to-qcow2-compressed.sh: Skip test for all zeroes disk

2023-08-08 Thread Laszlo Ersek
On 8/8/23 00:28, Richard W.M. Jones wrote: > Occasionally this test will choose a random seed which results in an > all-zeroes disk. The test tries to convert this to a compressed qcow2 > file, and fails because no compressed clusters are detected in the > resulting file. This happens because qco

Re: [Libguestfs] [PATCH nbdkit v2 8/9] curl: Use curl multi interface

2023-08-07 Thread Laszlo Ersek
On 8/7/23 13:08, Richard W.M. Jones wrote: > On Mon, Aug 07, 2023 at 12:57:02PM +0200, Laszlo Ersek wrote: >> On 8/4/23 20:04, Richard W.M. Jones wrote: >>> On Fri, Aug 04, 2023 at 11:38:03AM -0500, Eric Blake wrote: >>>> On Fri, Jul 28, 2023 at 06:17:52PM +

Re: [Libguestfs] [libnbd PATCH v4 05/25] golang: Change logic of copy_uint32_array

2023-08-07 Thread Laszlo Ersek
ne guarantees that the server's response fits within 64M >> bytes (count will be smaller than that, since it is multiple bytes per >> extent entry). >> >> Suggested-by: Laszlo Ersek >> CC: Nir Soffer >> Signed-off-by: Eric Blake >> --- >>

Re: [Libguestfs] [PATCH nbdkit v2 8/9] curl: Use curl multi interface

2023-08-07 Thread Laszlo Ersek
On 8/4/23 20:04, Richard W.M. Jones wrote: > On Fri, Aug 04, 2023 at 11:38:03AM -0500, Eric Blake wrote: >> On Fri, Jul 28, 2023 at 06:17:52PM +0100, Richard W.M. Jones wrote: >>> See the comment at the top of plugins/curl/pool.c for general >>> information about how this works. >>> >>> This makes

Re: [Libguestfs] [libnbd PATCH 6/7] golang: Improve whitespace style in generated bindings

2023-07-28 Thread Laszlo Ersek
On 7/27/23 21:22, Eric Blake wrote: > On Thu, Jul 27, 2023 at 08:50:31PM +0200, Laszlo Ersek wrote: >>> File "GoLang.ml", line 186, characters 11-71: >>> 186 | pr ("\t" ^ "/* %s fi

Re: [Libguestfs] [libnbd PATCH 4/7] Revert "generator/Go.ml: Simplify copy_uint32_array"

2023-07-27 Thread Laszlo Ersek
On 7/27/23 19:36, Eric Blake wrote: > On Thu, Jul 27, 2023 at 01:23:24PM +0200, Laszlo Ersek wrote: >> On 7/26/23 19:50, Eric Blake wrote: >>> This reverts commit 6725fa0e129f9a60d7b89707ef8604e0aeeeaf43, although >>> with a more modern style. >>> >>

Re: [Libguestfs] [libnbd PATCH 6/7] golang: Improve whitespace style in generated bindings

2023-07-27 Thread Laszlo Ersek
On 7/27/23 19:27, Eric Blake wrote: > On Thu, Jul 27, 2023 at 01:54:25PM +0200, Laszlo Ersek wrote: >> On 7/26/23 19:50, Eric Blake wrote: >>> Use Go-preferred whitespace: TAB for indent, and no space before >>> opening '(', better use of blank lines. These

Re: [Libguestfs] [libnbd PATCH 1/7] api: Expose "qemu:" meta-context constants

2023-07-27 Thread Laszlo Ersek
On 7/27/23 17:03, Laszlo Ersek wrote: > On 7/27/23 16:33, Eric Blake wrote: >> On Thu, Jul 27, 2023 at 01:41:03PM +0200, Laszlo Ersek wrote: >>> On 7/26/23 19:29, Eric Blake wrote: >>>> Qemu has a couple of documented meta-context definitions[1]; we might >>&

Re: [Libguestfs] [libnbd PATCH 1/7] api: Expose "qemu:" meta-context constants

2023-07-27 Thread Laszlo Ersek
On 7/27/23 16:33, Eric Blake wrote: > On Thu, Jul 27, 2023 at 01:41:03PM +0200, Laszlo Ersek wrote: >> On 7/26/23 19:29, Eric Blake wrote: >>> Qemu has a couple of documented meta-context definitions[1]; we might >>> as well expose constants for these namespaces. >

Re: [Libguestfs] [libnbd PATCH 7/7] golang: Enforce coding style during 'make check'

2023-07-27 Thread Laszlo Ersek
ST_GOFMT_ALL=1 while running this test. > +if test x"$TEST_GOFMT_ALL" = x; then > +exclude='-not -name bindings.go' > +else > +exclude= > +fi > + > +$GOFMT -d $(find . -name "*.go" $exclude) > codestyle-tests.out > +if test -s codestyle-

Re: [Libguestfs] [libnbd PATCH 5/7] golang: Use 'gofmt' style recommendations on manual files

2023-07-27 Thread Laszlo Ersek
ats_test.go b/golang/libnbd_620_stats_test.go > index 7b4ba009..63667160 100644 > --- a/golang/libnbd_620_stats_test.go > +++ b/golang/libnbd_620_stats_test.go > @@ -124,16 +124,16 @@ func Test620Stats(t *testing.T) { > t.Fatalf("%s", err) > } > > - if bs2 != bs1 + 28 { > + if bs2 != bs1+28 { > t.Fatalf("unexpected value for bs2") > } > - if cs2 != cs1 + 1 { > + if cs2 != cs1+1 { > t.Fatalf("unexpected value for cs2") > } > - if br2 != br1 + 16 { /* assumes nbdkit uses simple reply */ > + if br2 != br1+16 { /* assumes nbdkit uses simple reply */ > t.Fatalf("unexpected value for br2") > } > - if cr2 != cr1 + 1 { > + if cr2 != cr1+1 { > t.Fatalf("unexpected value for cr2") > } > > @@ -169,13 +169,13 @@ func Test620Stats(t *testing.T) { > if bs3 <= bs2 { > t.Fatalf("unexpected value for bs3") > } > - if cs3 != cs2 + 1 { > + if cs3 != cs2+1 { > t.Fatalf("unexpected value for cs3") > } > if br3 < br2 { > t.Fatalf("unexpected value for br3") > } > - if cr3 != cr2 + slop { > + if cr3 != cr2+slop { > t.Fatalf("unexpected value for cr3") > } > } I've done nearly nothing in Go, and generally the updates look justified... but the changes to "libnbd_620_stats_test.go" are hideous. Who on Earth considers if cr3 != cr2+slop superior to if cr3 != cr2 + slop ??? *shudder* Question in passing: if we wrote if cr3 != (cr2 + slop) would gofmt contract that too to if cr3 != (cr2+slop) ? Asking because I suspect that gofmt's purpose with the whitespace removal around "+" is to emphasize that "+" binds more strongly than "!=". And, if we forced the binding with () around +, then gofmt might not feel the need to emphasize the difference between the binding strengths. Acked-by: Laszlo Ersek Laszlo ___ Libguestfs mailing list Libguestfs@redhat.com https://listman.redhat.com/mailman/listinfo/libguestfs

Re: [Libguestfs] [libnbd PATCH 2/7] golang: Export meta-context constants

2023-07-27 Thread Laszlo Ersek
is > patch needs to be rethought a bit, as it would impact API for existing > public constants as well as the ones changed here. But we don't > promise API stability for Go. I think all caps should be fine. The "golang/bindigs

Re: [Libguestfs] [libnbd PATCH v4 4/6] states: Prepare to send 64-bit requests

2023-07-24 Thread Laszlo Ersek
t; + > +int > +main (int argc, char *argv[]) > +{ > + struct nbd_handle *nbd; > + const char *cmd[] = { > +"nbdkit", "-s", "-v", "--exit-with-parent", "memory", "1048576", NULL > + }; > + uint32_

Re: [Libguestfs] [libnbd PATCH v4 6/6] states: Break deadlock if server goofs on extended replies

2023-07-24 Thread Laszlo Ersek
; + if (magic != NBD_EXTENDED_REPLY_MAGIC) { > +SET_NEXT_STATE (%.DEAD); /* We've probably lost synchronization. */ > +set_error (0, "invalid or unexpected reply magic 0x%" PRIx32, magic); > + } > +} > +return 0; >case 0: SET_NEXT_STATE (%CHECK_REPLY_MAGIC); >} >return 0; Acked-by: Laszlo Ersek ___ Libguestfs mailing list Libguestfs@redhat.com https://listman.redhat.com/mailman/listinfo/libguestfs

Re: [Libguestfs] [libnbd PATCH v4 5/6] states: Prepare to receive 64-bit replies

2023-07-24 Thread Laszlo Ersek
be16toh (h->sbuf.reply.hdr.structured.type); > -length = be32toh (h->sbuf.reply.hdr.structured.length); > -debug (h, "unexpected reply type %u or payload length %" PRIu32 > - " for cookie %" PRIu64 &quo

Re: [Libguestfs] [libnbd PATCH v4 1/6] internal: Track chunk payload length left

2023-07-24 Thread Laszlo Ersek
> assert (CALLBACK_IS_NOT_NULL (cmd->cb.fn.extent)); > assert (h->bs_entries); > -assert (length >= 12); > +assert (h->payload_left >= 12); > assert (h->meta_valid); > > /* Need to byte-sw

Re: [Libguestfs] [libnbd PATCH v4 2/6] block_status: Refactor array storage

2023-07-24 Thread Laszlo Ersek
_entries[0]; > +context_id = be32toh (h->sbuf.reply.payload.bs_hdr_32.context_id); > for (i = 0; i < h->meta_contexts.len; ++i) >if (context_id == h->meta_contexts.ptr[i].context_id) > break; > > if (i < h->me

Re: [Libguestfs] [libnbd PATCH v4 3/6] protocol: Add definitions for extended headers

2023-07-24 Thread Laszlo Ersek
mit e6f3b94a for > NBD_FLAG_BLOCK_STATUS_PAYLOAD is saved for a later patch). > > [1] > https://github.com/NetworkBlockDevice/nbd/blob/extension-ext-header/doc/proto.md > > Signed-off-by: Eric Blake > Reviewed-by: Laszlo Ersek > --- > > v4: tweak comment on block_s

Re: [Libguestfs] [libnbd PATCH v3 06/22] states: Break deadlock if server goofs on extended replies

2023-07-21 Thread Laszlo Ersek
On 7/21/23 14:50, Eric Blake wrote: > On Thu, Jun 01, 2023 at 03:42:30PM +0200, Laszlo Ersek wrote: >> On 5/25/23 15:00, Eric Blake wrote: >>> One of the benefits of extended replies is that we can do a >>> fixed-length read for the entire header of every server reply,

Re: [Libguestfs] [PATCH guestfs-tools] diff: Don't compare st_dev or st_ino fields

2023-07-20 Thread Laszlo Ersek
tfs.org/virt-diff.1.html > This tool will find differences in filenames, file sizes, checksums, > extended attributes, file content and more from a virtual machine or > disk image. However it does not look at the boot loader, unused space > between partitions or wi

Re: [Libguestfs] [libguestfs PATCH v2 0/7] lib: support networking with passt

2023-07-14 Thread Laszlo Ersek
On 7/14/23 15:32, Richard W.M. Jones wrote: > On Fri, Jul 14, 2023 at 03:22:06PM +0200, Laszlo Ersek wrote: >> Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2184967 >> v1: https://listman.redhat.com/archives/libguestfs/2023-July/031984.html >> >> V2 implements sm

Re: [Libguestfs] [libnbd PATCH 1/2] api: Tighten rules on completion.callback

2023-07-14 Thread Laszlo Ersek
On 7/14/23 16:13, Eric Blake wrote: > On Fri, Jul 14, 2023 at 09:13:42AM +0200, Laszlo Ersek wrote: >> On 7/13/23 21:29, Eric Blake wrote: >>> The documentation has claimed since commit 6f4dcdab that any >>> completion callback will be called exactly once; but this is

[Libguestfs] [libguestfs PATCH v2 7/7] lib/launch-direct: support networking with passt

2023-07-14 Thread Laszlo Ersek
quot;, and "ip neighbor" at the virt-rescue prompt. There are four scenarios: two libguest backends, times passt being installed or not installed.) Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2184967 Signed-off-by: Laszlo Ersek --- Notes: v2: - document

[Libguestfs] [libguestfs PATCH v2 5/7] lib: move guestfs_int_create_socketname() from "launch.c" to "tmpdirs.c"

2023-07-14 Thread Laszlo Ersek
e socket directory, not in the temporary directory. Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2184967 Signed-off-by: Laszlo Ersek Reviewed-by: Richard W.M. Jones --- Notes: v2: - pick up Rich's R-b lib/guestfs-internal.h | 2 +- lib/launch.c

[Libguestfs] [libguestfs PATCH v2 3/7] docs: fix broken link in the guestfs manual

2023-07-14 Thread Laszlo Ersek
different anchor for "src/guestfs.pod". Adapt the reference. Fixes: 55202a4d49a101392148d79cb2e1591428db2681 Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2184967 Signed-off-by: Laszlo Ersek Reviewed-by: Richard W.M. Jones --- Notes: v2: - pick up Rich's R-b

[Libguestfs] [libguestfs PATCH v2 4/7] docs: clarify sockdir's separation

2023-07-14 Thread Laszlo Ersek
tps://bugzilla.redhat.com/show_bug.cgi?id=2184967 Signed-off-by: Laszlo Ersek Reviewed-by: Richard W.M. Jones --- Notes: v2: - pick up Rich's R-b generator/actions_properties.ml | 8 ++-- fish/guestfish.pod | 4 ++-- lib/guestfs.pod | 4 ++-- 3 file

[Libguestfs] [libguestfs PATCH v2 6/7] lib: introduce guestfs_int_make_pid_path()

2023-07-14 Thread Laszlo Ersek
like [1], - it takes a name like both [1] and [2], but the name is not size-limited like in [2], plus we hardcode the suffix from [1] as ".pid". Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2184967 Signed-off-by: Laszlo Ersek Reviewed-by: Richard W.M. Jones ---

[Libguestfs] [libguestfs PATCH v2 2/7] lib/launch-libvirt: support networking with passt

2023-07-14 Thread Laszlo Ersek
/bugzilla.redhat.com/show_bug.cgi?id=2184967 Signed-off-by: Laszlo Ersek Reviewed-by: Richard W.M. Jones --- Notes: v2: - redirect "passt --help" stdout+stderr to /dev/null unless verbose [Rich] - pick up Rich's R-b lib/guestfs-internal.h | 1 +

[Libguestfs] [libguestfs PATCH v2 1/7] lib: fix NETWORK_ADDRESS: make it an actual IP address, not a subnet base

2023-07-14 Thread Laszlo Ersek
ble IP address changes from 169.254.2.15 to 169.254.0.0, which is an IP address that makes no sense for an endpoint. Fix the latent bug by specifying the actual guest IP address we want, in NETWORK_ADDRESS. Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2184967 Signed-off-by: Laszlo Ersek

[Libguestfs] [libguestfs PATCH v2 0/7] lib: support networking with passt

2023-07-14 Thread Laszlo Ersek
uoted (cmd, "passt --help"); > + if (!g->verbose) > +guestfs_int_cmd_add_string_unquoted (cmd, " >/dev/null 2>&1"); > + >r = guestfs_int_cmd_run (cmd); >if (r == -1 || !WIFEXITED (r)) > return false; dispersed over patches #2

Re: [Libguestfs] [libguestfs PATCH 7/7] lib/launch-direct: support networking with passt

2023-07-14 Thread Laszlo Ersek
On 7/14/23 11:53, Richard W.M. Jones wrote: > On Thu, Jul 13, 2023 at 07:10:52PM +0200, Laszlo Ersek wrote: >> On QEMU 7.2.0+, if "passt" is available, ask QEMU for passt ("stream") >> rather than SLIRP ("user") networking. >> >> F

Re: [Libguestfs] [libguestfs PATCH 0/7] lib: support networking with passt

2023-07-14 Thread Laszlo Ersek
On 7/14/23 11:29, Richard W.M. Jones wrote: > On Thu, Jul 13, 2023 at 07:10:45PM +0200, Laszlo Ersek wrote: >> Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2184967 >> >> This series makes both backends prefer passt over slirp for appliance >> networking, if QE

Re: [Libguestfs] [libguestfs PATCH 4/7] docs: clarify sockdir's separation

2023-07-14 Thread Laszlo Ersek
On 7/14/23 11:42, Richard W.M. Jones wrote: > On Thu, Jul 13, 2023 at 07:10:49PM +0200, Laszlo Ersek wrote: >> There's another reason for separating sockdir from tmpdir, beyond "shorter >> pathnames needed": permissions. For example, passt drops privileges such >&g

Re: [Libguestfs] [libguestfs PATCH 2/7] lib/launch-libvirt: support networking with passt

2023-07-14 Thread Laszlo Ersek
On 7/14/23 11:40, Richard W.M. Jones wrote: > On Thu, Jul 13, 2023 at 07:10:47PM +0200, Laszlo Ersek wrote: >> We generate the element on libvirt 3.8.0+ already. >> >> For selecting passt rather than SLIRP, we only need to insert the child >> element . Make that c

Re: [Libguestfs] [libnbd PATCH 2/2] tests: Add coverage of nbd_aio_opt_* in wrong state

2023-07-14 Thread Laszlo Ersek
> create mode 100644 tests/errors-not-negotiating-aio.c Acked-by: Laszlo Ersek Laszlo > > diff --git a/lib/opt.c b/lib/opt.c > index f58d5e19..1446eef3 100644 > --- a/lib/opt.c > +++ b/lib/opt.c > @@ -223,6 +223,7 @@ nbd_unlocked_opt_list (struct nbd_handle *h, &

Re: [Libguestfs] [libnbd PATCH 1/2] api: Tighten rules on completion.callback

2023-07-14 Thread Laszlo Ersek
n all-or-nothing approach for async APIs. If the API fails at once, it should not take ownership of anything; i.e., it shouldn't call either completion or free callbacks. And if it succeeds, then it should take complete ownership. I'm not suggesting to rework callbacks whole-sale for

Re: [Libguestfs] [libguestfs PATCH 7/7] lib/launch-direct: support networking with passt

2023-07-13 Thread Laszlo Ersek
On 7/13/23 19:10, Laszlo Ersek wrote: > On QEMU 7.2.0+, if "passt" is available, ask QEMU for passt ("stream") > rather than SLIRP ("user") networking. > > For this, we need to run passt ourselves. Given that passt daemonizes by > de

[Libguestfs] [libguestfs PATCH 5/7] lib: move guestfs_int_create_socketname() from "launch.c" to "tmpdirs.c"

2023-07-13 Thread Laszlo Ersek
e socket directory, not in the temporary directory. Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2184967 Signed-off-by: Laszlo Ersek --- lib/guestfs-internal.h | 2 +- lib/launch.c | 26 lib/tmpdirs.c | 26 3 files changed, 2

[Libguestfs] [libguestfs PATCH 2/7] lib/launch-libvirt: support networking with passt

2023-07-13 Thread Laszlo Ersek
/bugzilla.redhat.com/show_bug.cgi?id=2184967 Signed-off-by: Laszlo Ersek --- lib/guestfs-internal.h | 1 + lib/launch-libvirt.c | 11 lib/launch.c | 28 3 files changed, 40 insertions(+) diff --git a/lib/guestfs-internal.h b/lib/guestfs-internal.h ind

[Libguestfs] [libguestfs PATCH 4/7] docs: clarify sockdir's separation

2023-07-13 Thread Laszlo Ersek
tps://bugzilla.redhat.com/show_bug.cgi?id=2184967 Signed-off-by: Laszlo Ersek --- generator/actions_properties.ml | 8 ++-- fish/guestfish.pod | 4 ++-- lib/guestfs.pod | 4 ++-- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/generator/actions_

[Libguestfs] [libguestfs PATCH 6/7] lib: introduce guestfs_int_make_pid_path()

2023-07-13 Thread Laszlo Ersek
like [1], - it takes a name like both [1] and [2], but the name is not size-limited like in [2], plus we hardcode the suffix from [1] as ".pid". Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2184967 Signed-off-by: Laszlo Ersek --- lib/guestfs-internal.h | 1 + lib/tmpdirs.

[Libguestfs] [libguestfs PATCH 3/7] docs: fix broken link in the guestfs manual

2023-07-13 Thread Laszlo Ersek
different anchor for "src/guestfs.pod". Adapt the reference. Fixes: 55202a4d49a101392148d79cb2e1591428db2681 Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2184967 Signed-off-by: Laszlo Ersek --- lib/guestfs.pod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[Libguestfs] [libguestfs PATCH 1/7] lib: fix NETWORK_ADDRESS: make it an actual IP address, not a subnet base

2023-07-13 Thread Laszlo Ersek
ble IP address changes from 169.254.2.15 to 169.254.0.0, which is an IP address that makes no sense for an endpoint. Fix the latent bug by specifying the actual guest IP address we want, in NETWORK_ADDRESS. Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2184967 Signed-off-by: Laszlo Ersek

[Libguestfs] [libguestfs PATCH 7/7] lib/launch-direct: support networking with passt

2023-07-13 Thread Laszlo Ersek
quot;, and "ip neighbor" at the virt-rescue prompt. There are four scenarios: two libguest backends, times passt being installed or not installed.) Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2184967 Signed-off-by: Laszlo Ersek --- lib/guestfs-internal.h | 26 lib/launch-dire

[Libguestfs] [libguestfs PATCH 0/7] lib: support networking with passt

2023-07-13 Thread Laszlo Ersek
"appliance networking with passt" works with either backend, but with the libvirt backend, there are some appliance-visible differences from the SLIRP environment. Whether that's a problem in practice, I can't tell (probably not a problem) -- dependent on future decisions about

Re: [Libguestfs] [libguestfs PATCH] lib: remove guestfs_int_cmd_clear_close_files()

2023-07-12 Thread Laszlo Ersek
On 7/11/23 15:10, Richard W.M. Jones wrote: > On Tue, Jul 11, 2023 at 01:39:06PM +0200, Laszlo Ersek wrote: >> The last (only?) caller of guestfs_int_cmd_clear_close_files() disappeared >> in commit e4c396888056 ("lib/info: Remove /dev/fd hacking and pass a true >>

[Libguestfs] [libguestfs PATCH] lib: remove guestfs_int_cmd_clear_close_files()

2023-07-11 Thread Laszlo Ersek
ned-off-by: Laszlo Ersek --- lib/guestfs-internal.h | 1 - lib/command.c | 37 ++--- 2 files changed, 10 insertions(+), 28 deletions(-) diff --git a/lib/guestfs-internal.h b/lib/guestfs-internal.h index fb55e02614f5..c7ef32277e93 100644 --- a/lib/guestfs-intern

Re: [Libguestfs] [v2v PATCH v2 2/3] lib/utils: make "chown_for_libvirt_rhbz_1045069" fail hard

2023-06-30 Thread Laszlo Ersek
On 6/30/23 09:38, Richard W.M. Jones wrote: > On Fri, Jun 30, 2023 at 09:32:33AM +0200, Laszlo Ersek wrote: >> On 6/29/23 19:16, Richard W.M. Jones wrote: >>> On Thu, Jun 29, 2023 at 06:40:27PM +0200, Laszlo Ersek wrote: >> >>>> Either way, I can restore the p

Re: [Libguestfs] [v2v PATCH v2 2/3] lib/utils: make "chown_for_libvirt_rhbz_1045069" fail hard

2023-06-30 Thread Laszlo Ersek
On 6/29/23 19:16, Richard W.M. Jones wrote: > On Thu, Jun 29, 2023 at 06:40:27PM +0200, Laszlo Ersek wrote: >> Either way, I can restore the parens. Do you want me to submit a v3? > > I think the parens are clearer. Don't need a v3, thanks! Can I add your R-b that

Re: [Libguestfs] [v2v PATCH v2 2/3] lib/utils: make "chown_for_libvirt_rhbz_1045069" fail hard

2023-06-29 Thread Laszlo Ersek
On 6/29/23 17:48, Richard W.M. Jones wrote: > On Thu, Jun 29, 2023 at 05:39:34PM +0200, Laszlo Ersek wrote: >> On 6/29/23 14:54, Richard W.M. Jones wrote: >>> On Thu, Jun 29, 2023 at 02:34:42PM +0200, Laszlo Ersek wrote: >>>> Currently "chown_for_libvirt_rhbz_1

Re: [Libguestfs] [PATCH libguestfs] generator: Add --chown option for virt-customize

2023-06-29 Thread Laszlo Ersek
host. > + > +=item * > + > +This will not work with Windows guests. > + > +=back > + > +For example: > + > + virt-customize --chown '0.0:/var/log/audit.log' > + > +See also: I<--upload>."; > + }; > + >{ op_name = "

Re: [Libguestfs] [PATCH guestfs-tools] customize: Implement --chown option

2023-06-29 Thread Laszlo Ersek
, int_of_string gid > + with Failure _ -> > + error (f_"--chown: could not parse numeric UID.GID from \ > + %s") uid_gid in > + > + message (f_"Changing owner of %s to %d.%d") path uid gid; > + g#ch

Re: [Libguestfs] [v2v PATCH v2 2/3] lib/utils: make "chown_for_libvirt_rhbz_1045069" fail hard

2023-06-29 Thread Laszlo Ersek
On 6/29/23 14:54, Richard W.M. Jones wrote: > On Thu, Jun 29, 2023 at 02:34:42PM +0200, Laszlo Ersek wrote: >> Currently "chown_for_libvirt_rhbz_1045069" is best effort; if it fails, we >> suppress the exception (we log it in verbose mode only, even). >> >>

[Libguestfs] [v2v PATCH v2 3/3] docs/virt-v2v: document libvirt system instance startup

2023-06-29 Thread Laszlo Ersek
p manually. Thanks: Daniel Berrangé Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2182024 Signed-off-by: Laszlo Ersek --- Notes: v2: - rewrite using the language suggested by Rich context:-U12 docs/virt-v2v.pod | 23 +++- 1 file changed, 22 insert

[Libguestfs] [v2v PATCH v2 2/3] lib/utils: make "chown_for_libvirt_rhbz_1045069" fail hard

2023-06-29 Thread Laszlo Ersek
threw an exception, then we'd leak the temp dir in the filesystem. Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2182024 Signed-off-by: Laszlo Ersek --- Notes: v2: - new patch lib/utils.mli | 5 +--- lib/utils.ml | 26 2 files changed, 11 inse

[Libguestfs] [v2v PATCH v2 1/3] lib/utils: fix typo

2023-06-29 Thread Laszlo Ersek
Fix a small comment typo from commit 4e7f20684373 ("lib: Improve security of in/out sockets when running virt-v2v as root", 2022-03-23). Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2182024 Signed-off-by: Laszlo Ersek --- Notes: v2: - new patch lib/utils.mli

[Libguestfs] [v2v PATCH v2 0/3] improve UX when running as root and we can't chown

2023-06-29 Thread Laszlo Ersek
ges (namely that we couldn't connect to libvirt). Document those connection problems, and a simple way to start up all libvirt daemons. Laszlo Ersek (3): lib/utils: fix typo lib/utils: make "chown_for_libvirt_rhbz_1045069" fail hard docs/virt-v2v: document libvirt system insta

Re: [Libguestfs] [v2v PATCH] docs/virt-v2v: document libvirt system instance startup

2023-06-28 Thread Laszlo Ersek
On 6/28/23 14:38, Richard W.M. Jones wrote: > On Wed, Jun 28, 2023 at 01:31:53PM +0200, Laszlo Ersek wrote: >> On 6/28/23 12:05, Richard W.M. Jones wrote: >>> On Tue, Jun 27, 2023 at 07:14:36PM +0200, Laszlo Ersek wrote: >>>> It has frequently tripped us up that on

Re: [Libguestfs] [v2v PATCH] docs/virt-v2v: document libvirt system instance startup

2023-06-28 Thread Laszlo Ersek
On 6/28/23 12:05, Richard W.M. Jones wrote: > On Tue, Jun 27, 2023 at 07:14:36PM +0200, Laszlo Ersek wrote: >> It has frequently tripped us up that on RHEL / Fedora, installing the >> right set of libvirt RPMs (such as the one pulled in by >> "libvirt-daemon-kvm") do

Re: [Libguestfs] [PATCH libguestfs 4/4] ocaml/t/guestfs_065_implicit_close.ml: Skip this test on OCaml 5

2023-06-28 Thread Laszlo Ersek
On 6/27/23 14:33, Richard W.M. Jones wrote: > Link: > https://discuss.ocaml.org/t/ocaml-5-forcing-objects-to-be-collected-and-finalized/12492/2 > --- > ocaml/t/guestfs_065_implicit_close.ml | 8 > 1 file changed, 8 insertions(+) > > diff --git a/ocaml/t/guestfs_065_implicit_close.ml >

Re: [Libguestfs] [PATCH libguestfs 1/4] ocaml: Replace old enter/leave_blocking_section calls

2023-06-28 Thread Laszlo Ersek
On 6/27/23 14:33, Richard W.M. Jones wrote: > Since OCaml 4 the old and confusing caml_enter_blocking_section and > caml_leave_blocking_section calls have been replaced with > caml_release_runtime_system and caml_acquire_runtime_system (in that > order). Use the new names. > --- > generator/OCaml

[Libguestfs] [v2v PATCH] docs/virt-v2v: document libvirt system instance startup

2023-06-27 Thread Laszlo Ersek
p manually. Thanks: Daniel Berrangé Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2182024 Signed-off-by: Laszlo Ersek --- Notes: context:-U12 docs/virt-v2v.pod | 20 +++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/docs/virt-v2v.pod b/docs/virt-v2v

Re: [Libguestfs] [PATCH libnbd] ocaml: Release runtime lock around call to nbd_close

2023-06-22 Thread Laszlo Ersek
n. > > However specifically if there are callbacks (eg. a debug callback) > then we would end up trying to re-acquire the lock in the callback, > resulting in a crash: Drop the word "However"? Paragraph #3 appears to support paragraph #2, not to oppose it. Acked-by: Laszlo E

Re: [Libguestfs] [v2v PATCH] test-data/phony-guests: fix prerequisite list of "fedora-luks-on-lvm.img"

2023-06-20 Thread Laszlo Ersek
On 6/20/23 11:14, Laszlo Ersek wrote: > On 6/20/23 09:41, Richard W.M. Jones wrote: >> On Mon, Jun 19, 2023 at 06:27:29PM +0200, Laszlo Ersek wrote: >>> In the virt-v2v repo, commit 1e75569aa074 ("test-data/phony-guests: Allow >>> virt-v2v to work against phony F

Re: [Libguestfs] [libnbd PATCH v4 4/4] internal: Refactor layout of replies in sbuf

2023-06-20 Thread Laszlo Ersek
length); > > assert (cmd); /* guaranteed by CHECK */ > assert (cmd->type == NBD_CMD_BLOCK_STATUS); > @@ -479,8 +479,8 @@ REPLY.CHUNK_REPLY.RESYNC: >SET_NEXT_STATE (%^FINISH_COMMAND); >return 0; > } > -type = be16toh (h->sbuf.sr.structured_reply.type); > -length = be32toh (h->sbuf.sr.structured_reply.length); > +type = be16toh (h->sbuf.reply.hdr.structured.type); > +length = be32toh (h->sbuf.reply.hdr.structured.length); > debug (h, "unexpected reply type %u or payload length %" PRIu32 > " for cookie %" PRIu64 " and command %" PRIu32 > ", this is probably a server bug", > @@ -494,7 +494,7 @@ REPLY.CHUNK_REPLY.RESYNC: > REPLY.CHUNK_REPLY.FINISH: >uint16_t flags; > > - flags = be16toh (h->sbuf.sr.structured_reply.flags); > + flags = be16toh (h->sbuf.reply.hdr.structured.flags); >if (flags & NBD_REPLY_FLAG_DONE) { > SET_NEXT_STATE (%^FINISH_COMMAND); >} > diff --git a/generator/states-reply-simple.c b/generator/states-reply-simple.c > index 19be5418..898bb84e 100644 > --- a/generator/states-reply-simple.c > +++ b/generator/states-reply-simple.c > @@ -23,7 +23,7 @@ REPLY.SIMPLE_REPLY.START: >struct command *cmd = h->reply_cmd; >uint32_t error; > > - error = be32toh (h->sbuf.simple_reply.error); > + error = be32toh (h->sbuf.reply.hdr.simple.error); > >if (cmd == NULL) { > /* Unexpected reply. If error was set or we have structured > @@ -39,7 +39,7 @@ REPLY.SIMPLE_REPLY.START: > if (error || h->structured_replies) >SET_NEXT_STATE (%^FINISH_COMMAND); > else { > - uint64_t cookie = be64toh (h->sbuf.simple_reply.cookie); > + uint64_t cookie = be64toh (h->sbuf.reply.hdr.simple.cookie); >SET_NEXT_STATE (%.DEAD); >set_error (EPROTO, > "no matching cookie %" PRIu64 " found for server reply, " Acked-by: Laszlo Ersek ___ Libguestfs mailing list Libguestfs@redhat.com https://listman.redhat.com/mailman/listinfo/libguestfs

Re: [Libguestfs] [libnbd PATCH v4 3/4] generator: Rename states-reply-structured to states-reply-chunk

2023-06-20 Thread Laszlo Ersek
. */ > } NBD_ATTRIBUTE_PACKED; > > -struct nbd_structured_reply_offset_hole { > +struct nbd_chunk_offset_hole { >uint64_t offset; >uint32_t length; /* Length of hole. */ > } NBD_ATTRIBUTE_PACKED; > > -struct nbd_structured_reply_error { > +struct nbd_chunk_err

Re: [Libguestfs] [PATCH v3] ldmtool: fix NULL pointer dereference

2023-06-20 Thread Laszlo Ersek
GArray * scanned = NULL; >> if (!devices) { >> scanned = get_devices(); >> +if (!scanned) >> + return FALSE; >> devices = (gchar **) scanned->data; >> } > > Seems fine, based on Laszlo's analysis of the

Re: [Libguestfs] [v2v PATCH] test-data/phony-guests: fix prerequisite list of "fedora-luks-on-lvm.img"

2023-06-20 Thread Laszlo Ersek
On 6/20/23 09:41, Richard W.M. Jones wrote: > On Mon, Jun 19, 2023 at 06:27:29PM +0200, Laszlo Ersek wrote: >> In the virt-v2v repo, commit 1e75569aa074 ("test-data/phony-guests: Allow >> virt-v2v to work against phony Fedora") is an ancestor of commit >> e4efe4b7d24

Re: [Libguestfs] [PATCH v1] ldmtool: fix NULL pointer dereference

2023-06-19 Thread Laszlo Ersek
On 6/19/23 16:36, Vincent Mailhol wrote: > If /sys/block can not be opened, get_devices() returns NULL. > > cmdline() does not check this result and below code snippet: > > scanned = get_devices(); > devices = (gchar **) scanned->data; > > results in a segmentation fault. >

Re: [Libguestfs] libldm crashes in a linux-sandbox context

2023-06-19 Thread Laszlo Ersek
On 6/19/23 16:32, Vincent Mailhol wrote: > On Mon 19 June 2023 at 21:16, Laszlo Ersek wrote: >> On 6/19/23 13:18, Vincent MAILHOL wrote: >>> On Fri. 16 juin 2023 at 16:34, Richard W.M. Jones wrote: >>> (...) >>>>> Last thing, the segfault on ldmtool [1]

  1   2   3   4   5   6   7   8   9   10   >