[libvirt] [PATCH] Remove redundant virFileDeletePID() call
Chris Lalancette
clalance at redhat.com
Fri Oct 23 14:12:16 UTC 2009
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 at 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.
Yeah, I wasn't quite sure which way to go. I'll do it the way you suggest when
I push.
Thanks,
--
Chris Lalancette
More information about the libvir-list
mailing list