Re: [Libguestfs] [libnbd PATCH 1/2] maint: Favor 4-space indent in .rs files

2023-09-01 Thread Richard W.M. Jones
On Wed, Aug 30, 2023 at 03:11:23PM -0500, Eric Blake wrote: > Since rustfmt favors 4-space indent on .rs files, we should do > likewise to reduce the churn when running rustfmt after editing in > an emacs session set to honor editorconfig. > > Signed-off-by: Eric Blake > --- > .editorconfig | 4

Re: [Libguestfs] [libnbd PATCH 0/3] Simplify nbd_shutdown vs. opt mode

2023-09-01 Thread Richard W.M. Jones
On Tue, Aug 29, 2023 at 05:20:40PM -0500, Eric Blake wrote: > While working on a larger set of patches to make nbdinfo favor > NBD_OPT_INFO over NBD_OPT_GO where possible (which requires use of > nbd_set_opt_mode(,true) in more cases), I noticed that it got unwieldy > to have to pick the correct sh

[Libguestfs] libnbd | Failed pipeline for master | 540e32cb

2023-09-01 Thread GitLab
Pipeline #989561805 has failed! Project: libnbd ( https://gitlab.com/nbdkit/libnbd ) Branch: master ( https://gitlab.com/nbdkit/libnbd/-/commits/master ) Commit: 540e32cb ( https://gitlab.com/nbdkit/libnbd/-/commit/540e32cb7ed04c6e6135404d6029cafb407f1258 ) Commit Message: rust: Fix a few typ

Re: [Libguestfs] [libnbd PATCH v9 6/7] rust: async: Add an example

2023-09-01 Thread Eric Blake
On Sat, Aug 26, 2023 at 11:29:59AM +, Tage Johansson wrote: > This patch adds an example using the asynchronous Rust bindings. > --- > rust/Cargo.toml| 1 + > rust/examples/concurrent-read-write.rs | 149 + > rust/run-tests.sh.in

Re: [Libguestfs] [libnbd PATCH 2/2] rust: Use mio::poll instead of requiring epoll

2023-09-01 Thread Eric Blake
On Fri, Sep 01, 2023 at 08:35:58AM +, Tage Johansson wrote: > > On 8/30/2023 10:11 PM, Eric Blake wrote: > > CI shows our async handle fails to build on FreeBSD and MacOS (where > > epoll() is not available as a syscall, and therefore not available as > > a Rust crate). We can instead accompl

Re: [Libguestfs] [libnbd PATCH 0/2] (Attempt to) fix some Rust CI failures

2023-09-01 Thread Richard W.M. Jones
Thanks - I believe we have equivalent fixes upstream now. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com nbdkit - Flexible, fast NBD server with plugins https://gitlab.com/nbdkit/nbdk

[Libguestfs] [libnbd PATCH 1/2] generator: Add string_starts_with functions to utils.ml

2023-09-01 Thread Tage Johansson
Previously, the file Rust.ml used the function String.starts_with. But this function is not available in older versions of OCaml. So an identical function (string_starts_with) has been created in utils.ml to be used instead. --- generator/utils.ml | 11 +++ generator/utils.mli | 3 +++ 2

[Libguestfs] [libnbd PATCH 2/2] rust: Add missing files to EXTRA_DIST

2023-09-01 Thread Tage Johansson
--- rust/Makefile.am | 1 + 1 file changed, 1 insertion(+) diff --git a/rust/Makefile.am b/rust/Makefile.am index 027097a..c5933e5 100644 --- a/rust/Makefile.am +++ b/rust/Makefile.am @@ -36,6 +36,7 @@ source_files = \ examples/connect-command.rs \ examples/get-size.rs \ e

[Libguestfs] [libnbd PATCH 0/2] (Attempt to) fix some Rust CI failures

2023-09-01 Thread Tage Johansson
These are two minor fixes to the Rust bindings to fix some CI failures. -- Best regards, Tage Tage Johansson (2): generator: Add string_starts_with functions to utils.ml rust: Add missing files to EXTRA_DIST generator/utils.ml | 11 +++ generator/utils.mli | 3 +++ rust/Makefile.

Re: [Libguestfs] [libnbd PATCH 2/2] rust: Use mio::poll instead of requiring epoll

2023-09-01 Thread Tage Johansson
On 8/30/2023 10:11 PM, Eric Blake wrote: CI shows our async handle fails to build on FreeBSD and MacOS (where epoll() is not available as a syscall, and therefore not available as a Rust crate). We can instead accomplish the same level-probing effects by doing a zero-timeout poll with mio (whic