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

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

 



Cole Robinson wrote:
> 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@xxxxxxxxxx>
>> ---
>>  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.

Yeah, I wasn't quite sure which way to go.  I'll do it the way you suggest when
I push.

Thanks,
-- 
Chris Lalancette

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[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]