[libvirt] [PATCH] cgroup: preserve correct errno on failure

Eric Blake eblake at redhat.com
Wed Feb 16 15:16:44 UTC 2011


On 02/15/2011 08:34 PM, Daniel Veillard wrote:
> On Tue, Feb 15, 2011 at 05:01:18PM -0700, Eric Blake wrote:
>> * src/util/cgroup.c (virCgroupSetValueStr, virCgroupGetValueStr)
>> (virCgroupRemoveRecursively): VIR_DEBUG can clobber errno.
>> (virCgroupRemove): Use VIR_DEBUG rather than DEBUG.
>> ---
>>  src/util/cgroup.c |   12 ++++++------
>>  1 files changed, 6 insertions(+), 6 deletions(-)
>>
>> diff --git a/src/util/cgroup.c b/src/util/cgroup.c
>> index 47c4633..b71eef9 100644
>> --- a/src/util/cgroup.c
>> +++ b/src/util/cgroup.c
>> @@ -290,8 +290,8 @@ static int virCgroupSetValueStr(virCgroupPtr group,
>>      VIR_DEBUG("Set value '%s' to '%s'", keypath, value);
>>      rc = virFileWriteStr(keypath, value, 0);
>>      if (rc < 0) {
>> -        DEBUG("Failed to write value '%s': %m", value);
>>          rc = -errno;
>> +        VIR_DEBUG("Failed to write value '%s': %m", value);

> 
>   ACK,

Thanks; pushed.

-- 
Eric Blake   eblake at redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20110216/38979b52/attachment-0001.sig>


More information about the libvir-list mailing list