[Libguestfs] [p2v PATCH 09/11] gui: expose "p2v.output.misc" (-oo)

Laszlo Ersek lersek at redhat.com
Tue Jan 31 13:02:45 UTC 2023


On 1/30/23 19:15, Richard W.M. Jones wrote:
> On Mon, Jan 30, 2023 at 03:22:26PM +0100, Laszlo Ersek wrote:
>> +  str = gtk_entry_get_text (GTK_ENTRY (oo_entry));
>> +  guestfs_int_free_string_list (config->output.misc);
>> +  config->output.misc = guestfs_int_split_string (',', str);
> 
> My concern here is that someone is going to put "foo=bar, baz=1" in
> this field, and it will improperly split above.  So maybe a bit of
> trimming on the resulting array?

Not a bad idea at all, but it creates inconsistency with the kernel
cmdline interface. No trimming happens there, and I figured it best to
keep the format on the GUI and the kernel cmdline interchangeable.

(More precisely, I figured that the GUI should be consistent with the
*pre-existent* ConfigStringList items of the kernel cmdline too, such as
disks, removables, interfaces, network-map, and so on.)

I can update the tooltip to spell out "no spaces" or something.

> 
>> +  if (config->output.misc == NULL)
>> +    error (EXIT_FAILURE, errno, "strdup");
>> +
>>    /* Display the UI for conversion. */
>>    show_running_dialog ();
>>  
>> diff --git a/virt-p2v.pod b/virt-p2v.pod
>> index ecdae46eaaf6..a7e8edcbf9f0 100644
>> --- a/virt-p2v.pod
>> +++ b/virt-p2v.pod
>> @@ -175,6 +175,8 @@ first-time virt-p2v user.
>>>>   │ Output allocation (-oa): [sparse            ▼]
>>>> + │     Misc. options (-oo): [___________________]
>> + │
>>  
>>  All output options and paths are relative to the conversion server
>>  (I<not> to the physical server).
> 
> Be kind of nice to add a tiny bit more documentation here, especially
> as there's only a tool tip telling you what the field should contain.

I agree; I think I can just copy the tooltip (effectively) here.

Thanks!
Laszlo


More information about the Libguestfs mailing list