[libvirt] [PATCH REPOST 9/9] qemu: Introduce qemuBuildNetCommandLine

Ján Tomko jtomko at redhat.com
Mon Mar 14 09:49:06 UTC 2016


On Tue, Mar 08, 2016 at 02:03:16PM -0500, John Ferlan wrote:
> Add new function to manage adding the network device options to the
> command line removing that task from the mainline qemuBuildCommandLine.
> 
> Signed-off-by: John Ferlan <jferlan at redhat.com>
> ---
>  src/qemu/qemu_command.c | 133 +++++++++++++++++++++++++++++-------------------
>  1 file changed, 82 insertions(+), 51 deletions(-)
> 

> @@ -9029,8 +9062,6 @@ qemuBuildCommandLine(virConnectPtr conn,
>      /* free up any resources in the network driver
>       * but don't overwrite the original error */

This saving of the error was done because of the
virDomainConfNWFilterTeardown call. Removing the call made the *Error
calls pointless.

>      originalError = virSaveLastError();
> -    for (i = 0; last_good_net != -1 && i <= last_good_net; i++)
> -        virDomainConfNWFilterTeardown(def->nets[i]);

Before, this tore down the filters if any part of the command line
building failed. Now it's only done when qemuBuildNetCommandLine fails.

Fortunately, it seems these calls were redundant because qemuProcessStop
also calls virDomainConfVMNWFilterTeardown.

Jan




More information about the libvir-list mailing list