[libvirt] [PATCH 16/18] Do not skip hidden entries when looking for a stable path

Ján Tomko jtomko at redhat.com
Tue Jun 21 16:05:39 UTC 2016


The device names are unlikely to start with a dot.
'.' and '..' are already skipped by virDirRead.
---
 src/storage/storage_backend.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/src/storage/storage_backend.c b/src/storage/storage_backend.c
index 31c2974..32f0517 100644
--- a/src/storage/storage_backend.c
+++ b/src/storage/storage_backend.c
@@ -1951,9 +1951,6 @@ virStorageBackendStablePath(virStoragePoolObjPtr pool,
      */
  retry:
     while ((direrr = virDirRead(dh, &dent, NULL)) > 0) {
-        if (dent->d_name[0] == '.')
-            continue;
-
         if (virAsprintf(&stablepath, "%s/%s",
                         pool->def->target.path,
                         dent->d_name) == -1) {
-- 
2.7.3




More information about the libvir-list mailing list