diff options
author | Ján Tomko <jtomko@redhat.com> | 2016-06-21 16:34:08 +0200 |
---|---|---|
committer | Ján Tomko <jtomko@redhat.com> | 2016-06-24 14:20:57 +0200 |
commit | e81de04c1088b10997b7c13721dc4513e58a0b5d (patch) | |
tree | c6d62f138e0a19abb3f099ff56fedcb234f22bab /src/xen/xen_inotify.c | |
parent | f0ced7086a4c72af7dfa2662820fa8127327bc9b (diff) | |
download | libvirt-e81de04c1088b10997b7c13721dc4513e58a0b5d.tar.gz |
Use virDirOpen
Switch from opendir to virDirOpen everywhere we need to report an error.
Diffstat (limited to 'src/xen/xen_inotify.c')
-rw-r--r-- | src/xen/xen_inotify.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/xen/xen_inotify.c b/src/xen/xen_inotify.c index cd169e01e1..ac4070c917 100644 --- a/src/xen/xen_inotify.c +++ b/src/xen/xen_inotify.c @@ -360,12 +360,9 @@ xenInotifyOpen(virConnectPtr conn, return -1; /* populate initial list */ - if (!(dh = opendir(priv->configDir))) { - virReportSystemError(errno, - _("cannot open directory: %s"), - priv->configDir); + if (virDirOpen(&dh, priv->configDir) < 0) return -1; - } + while ((direrr = virDirRead(dh, &ent, priv->configDir)) > 0) { if (STRPREFIX(ent->d_name, ".")) continue; |