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

Re: [libvirt] [PATCH] Remove redundant virFileDeletePID() call



On 10/23/2009 07:01 AM, Chris Lalancette wrote:
> virFileDeletePID() is unnecessarily called in qemudRemoveDomainStatus().
> The only caller of qemudRemoveDomainStatus() is qemudShutdownVMDaemon(),
> and that already calls virFileDeletePID (with a better error message).
> Remove the redundant call here.
> 
> Signed-off-by: Chris Lalancette <clalance redhat com>
> ---
>  src/qemu/qemu_driver.c |    3 ---
>  1 files changed, 0 insertions(+), 3 deletions(-)
> 
> diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
> index 02bb5cb..4cd235d 100644
> --- a/src/qemu/qemu_driver.c
> +++ b/src/qemu/qemu_driver.c
> @@ -273,9 +273,6 @@ qemudRemoveDomainStatus(virConnectPtr conn,
>          goto cleanup;
>      }
>  
> -    if(virFileDeletePid(driver->stateDir, vm->def->name))
> -        goto cleanup;
> -
>      rc = 0;
>  cleanup:
>      VIR_FREE(file);

ACK to the code, but, given that RemoveDomainStatus' only function is to
remove files from stateDir, I think that's where virFileDeletePid
belongs. We should delete the call in qemudShutdownVMDaemon instead, and
transfer over the proper error message.

- Cole


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