On Sun, Aug 20, 2023 at 02:16:23PM +, Tage Johansson wrote:
> Previously, the examples fetch-first-sector and get-size in
> rust/examples only accepted a unix socket as argument. This commit makes
> it possible to provide a URI as well.
> ---
> rust/examples/fetch-first-sector.rs | 15 +++
> rust/examples/get-size.rs | 20 +++-
> 2 files changed, 26 insertions(+), 9 deletions(-)
> +++ b/rust/examples/get-size.rs
> @@ -5,6 +5,12 @@
> //!
> //! nbdkit -U - memory 1M \
> //! --run 'cargo run --example get-size -- $unixsocket'
> +//! Or with a URI:
> +//! nbdkit -U - memory 1M \
> +//! --run 'cargo run --example get-size -- $uri'
As $uri is likely to contain the shell glob character '?', we are best
writing this as 'cargo ... -- "$uri"' to set a good example about how
to avoid rare file name expansion interference. I made that change in
place, as well as tweaking ocaml/examples/get_size.ml where you copied
from.
For 1-4,
Reviewed-by: Eric Blake
and I've gone ahead and pushed them (55fec56c..e5563c0d), in order to
see the effect on CI.
For the rest of the series, I would like to spend a bit more time
reviewing.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc.
Virtualization: qemu.org | libguestfs.org
___
Libguestfs mailing list
Libguestfs@redhat.com
https://listman.redhat.com/mailman/listinfo/libguestfs