summaryrefslogtreecommitdiff
path: root/src/xen/xen_inotify.c
diff options
context:
space:
mode:
authorJán Tomko <jtomko@redhat.com>2016-06-21 16:34:08 +0200
committerJán Tomko <jtomko@redhat.com>2016-06-24 14:20:57 +0200
commite81de04c1088b10997b7c13721dc4513e58a0b5d (patch)
treec6d62f138e0a19abb3f099ff56fedcb234f22bab /src/xen/xen_inotify.c
parentf0ced7086a4c72af7dfa2662820fa8127327bc9b (diff)
downloadlibvirt-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.c7
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;