On 06/21/2016 12:05 PM, Ján Tomko wrote: > Remove all the remaining usage of opendir. > --- > src/openvz/openvz_conf.c | 3 +-- > src/qemu/qemu_hostdev.c | 2 +- > src/storage/storage_backend.c | 2 +- > src/util/vircgroup.c | 3 +-- > src/util/virhostcpu.c | 2 +- > src/util/virpci.c | 2 +- > 6 files changed, 6 insertions(+), 8 deletions(-) > [...] > diff --git a/src/util/vircgroup.c b/src/util/vircgroup.c > index 634f659..da20ba5 100644 > --- a/src/util/vircgroup.c > +++ b/src/util/vircgroup.c > @@ -3378,8 +3378,7 @@ virCgroupRemoveRecursively(char *grppath) > int rc = 0; > int direrr; > > - grpdir = opendir(grppath); > - if (grpdir == NULL) { > + if (virDirOpenQuiet(&grpdir, grppath) < 0) { > if (errno == ENOENT) > return 0; This one seems to be an ENOENT case... > rc = -errno; [...] ACK with the obvious adjustment John -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list