Re: [libvirt] [PATCH] cgroup: Add missing errno == ENOENT check in virCgroupRemoveRecursively

2010-06-30 Thread Ryota Ozaki
On Wed, Jun 30, 2010 at 3:21 AM, Eric Blake wrote: > On 06/28/2010 08:49 PM, Ryota Ozaki wrote:      grpdir = opendir(grppath);      if (grpdir == NULL) { +        if (errno == ENOENT) +            return 0; >>> >>> Shouldn't this be continue instead of return 0, so as to go on

Re: [libvirt] [PATCH] cgroup: Add missing errno == ENOENT check in virCgroupRemoveRecursively

2010-06-29 Thread Eric Blake
On 06/28/2010 08:49 PM, Ryota Ozaki wrote: >>> grpdir = opendir(grppath); >>> if (grpdir == NULL) { >>> +if (errno == ENOENT) >>> +return 0; >> >> Shouldn't this be continue instead of return 0, so as to go on to the >> next readdir() in case there is anything else in

Re: [libvirt] [PATCH] cgroup: Add missing errno == ENOENT check in virCgroupRemoveRecursively

2010-06-28 Thread Ryota Ozaki
On Tue, Jun 29, 2010 at 1:41 AM, Eric Blake wrote: > On 06/26/2010 11:21 AM, Ryota Ozaki wrote: >> ENOENT happens normally when a subsystem is enabled with any other >> subsystems and the directory of the target group has already removed >> in a prior loop. In that case, the function should just r

Re: [libvirt] [PATCH] cgroup: Add missing errno == ENOENT check in virCgroupRemoveRecursively

2010-06-28 Thread Eric Blake
On 06/26/2010 11:21 AM, Ryota Ozaki wrote: > ENOENT happens normally when a subsystem is enabled with any other > subsystems and the directory of the target group has already removed > in a prior loop. In that case, the function should just return without > leaving an error message. > > NB this is

[libvirt] [PATCH] cgroup: Add missing errno == ENOENT check in virCgroupRemoveRecursively

2010-06-26 Thread Ryota Ozaki
ENOENT happens normally when a subsystem is enabled with any other subsystems and the directory of the target group has already removed in a prior loop. In that case, the function should just return without leaving an error message. NB this is the same behavior as before introducing virCgroupRemov