[prev in list] [next in list] [prev in thread] [next in thread] 

List:       libguestfs
Subject:    Re: [Libguestfs] [libguestfs-common PATCH 10/12] mltools/tools_utils: generalize "--key" selector pa
From:       "Richard W.M. Jones" <rjones () redhat ! com>
Date:       2022-06-29 12:58:10
Message-ID: 20220629125810.GF1127 () redhat ! com
[Download RAW message or body]

On Wed, Jun 29, 2022 at 02:29:50PM +0200, Laszlo Ersek wrote:
> On 06/28/22 16:47, Richard W.M. Jones wrote:
> > On Tue, Jun 28, 2022 at 01:49:13PM +0200, Laszlo Ersek wrote:
> >>    if key_opts then (
> >>      let parse_key_selector arg =
> >> -      let parts = String.nsplit ~max:3 ":" arg in
> >> +      let parts = String.nsplit ":" arg in
> > 
> > Doesn't this change what is parsed, ie if you need to include
> > a ":" in the third string?
> 
> Ugh, yes it does -- but, regarding the C option parser, don't we have
> the same issue there already (pre-patch)?
> 
> For example, "--key ID:key:foo:bar" causes guestfs_int_split_string() to
> return "foo" and "bar" separately, doesn't it?
> 
> I think if a password contains a ":", the user just has to use a file
> selector.

True, so this makes the code more consistent with the C version.

[...]

> OK, I'll change the pre-patch default to abort() separately, and then
> stick with abort() in the new switch too.

Yup I think this would be better.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-top is 'top' for virtual machines.  Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://people.redhat.com/~rjones/virt-top
_______________________________________________
Libguestfs mailing list
Libguestfs@redhat.com
https://listman.redhat.com/mailman/listinfo/libguestfs

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic