Re: [PATCH 08/10] remote_driver: Move URI re-generation into a function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Feb 06, 2023 at 10:16:56 +0100, Michal Privoznik wrote:
> When handling virConnectOpen(), we parse given URI, specifically
> all those parameters we know, like ?mode, ?socket, ?name, etc.
> ignoring those we don't recognize yet. Then, we reconstruct the
> URI back, but ignoring all parameters we've parsed. In other
> words:
> 
>   qemu:///system?mode=legacy&foo=bar
> 
> becomes:
> 
>   qemu:///system?foo=bar
> 
> The reconstructed URI is then passed to the corresponding driver
> (QEMU in our example) with intent of it parsing parameters
> further (or just ignoring them).

Did you mean to put all the explanation above into the patch that is
going to modify it? Here it doesn't make much sense as ....

> 
> Now, this URI reconstruction is currently implemented in an else
> branch. Move it into a separate function so that it can be
> re-used.

... this patch simply moves the code doing the URI construction, where
you can't se what's actually happening to the parameters into a new
helper.

> 
> Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
> ---
>  src/remote/remote_driver.c | 26 +++++++++++++++++---------
>  1 file changed, 17 insertions(+), 9 deletions(-)

Reviewed-by: Peter Krempa <pkrempa@xxxxxxxxxx>




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux