[PATCH 17/18] Allow configs to start with a dot

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This fixes the disappearance of domains and networks starting with a
dot.

https://bugzilla.redhat.com/show_bug.cgi?id=1333248
---
 src/conf/network_conf.c     | 6 ------
 src/conf/nwfilter_conf.c    | 3 ---
 src/conf/storage_conf.c     | 6 ------
 src/conf/virdomainobjlist.c | 3 ---
 src/qemu/qemu_driver.c      | 3 ---
 5 files changed, 21 deletions(-)

diff --git a/src/conf/network_conf.c b/src/conf/network_conf.c
index 2aa7242..dfa851b 100644
--- a/src/conf/network_conf.c
+++ b/src/conf/network_conf.c
@@ -3244,9 +3244,6 @@ virNetworkLoadAllState(virNetworkObjListPtr nets,
     while ((ret = virDirRead(dir, &entry, stateDir)) > 0) {
         virNetworkObjPtr net;
 
-        if (entry->d_name[0] == '.')
-            continue;
-
         if (!virFileStripSuffix(entry->d_name, ".xml"))
             continue;
 
@@ -3274,9 +3271,6 @@ int virNetworkLoadAllConfigs(virNetworkObjListPtr nets,
     while ((ret = virDirRead(dir, &entry, configDir)) > 0) {
         virNetworkObjPtr net;
 
-        if (entry->d_name[0] == '.')
-            continue;
-
         if (!virFileStripSuffix(entry->d_name, ".xml"))
             continue;
 
diff --git a/src/conf/nwfilter_conf.c b/src/conf/nwfilter_conf.c
index 74f2a14..2cdcfa7 100644
--- a/src/conf/nwfilter_conf.c
+++ b/src/conf/nwfilter_conf.c
@@ -3212,9 +3212,6 @@ virNWFilterLoadAllConfigs(virNWFilterObjListPtr nwfilters,
     while ((ret = virDirRead(dir, &entry, configDir)) > 0) {
         virNWFilterObjPtr nwfilter;
 
-        if (entry->d_name[0] == '.')
-            continue;
-
         if (!virFileStripSuffix(entry->d_name, ".xml"))
             continue;
 
diff --git a/src/conf/storage_conf.c b/src/conf/storage_conf.c
index d1ca08b..05a1a49 100644
--- a/src/conf/storage_conf.c
+++ b/src/conf/storage_conf.c
@@ -1949,9 +1949,6 @@ virStoragePoolLoadAllState(virStoragePoolObjListPtr pools,
     while ((ret = virDirRead(dir, &entry, stateDir)) > 0) {
         virStoragePoolObjPtr pool;
 
-        if (entry->d_name[0] == '.')
-            continue;
-
         if (!virFileStripSuffix(entry->d_name, ".xml"))
             continue;
 
@@ -1983,9 +1980,6 @@ virStoragePoolLoadAllConfigs(virStoragePoolObjListPtr pools,
         char *autostartLink;
         virStoragePoolObjPtr pool;
 
-        if (entry->d_name[0] == '.')
-            continue;
-
         if (!virFileHasSuffix(entry->d_name, ".xml"))
             continue;
 
diff --git a/src/conf/virdomainobjlist.c b/src/conf/virdomainobjlist.c
index 51753fe..41c9910 100644
--- a/src/conf/virdomainobjlist.c
+++ b/src/conf/virdomainobjlist.c
@@ -578,9 +578,6 @@ virDomainObjListLoadAllConfigs(virDomainObjListPtr doms,
     while ((ret = virDirRead(dir, &entry, configDir)) > 0) {
         virDomainObjPtr dom;
 
-        if (entry->d_name[0] == '.')
-            continue;
-
         if (!virFileStripSuffix(entry->d_name, ".xml"))
             continue;
 
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 7769272..1174317 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -502,9 +502,6 @@ qemuDomainSnapshotLoad(virDomainObjPtr vm,
         goto cleanup;
 
     while ((direrr = virDirRead(dir, &entry, NULL)) > 0) {
-        if (entry->d_name[0] == '.')
-            continue;
-
         /* NB: ignoring errors, so one malformed config doesn't
            kill the whole process */
         VIR_INFO("Loading snapshot file '%s'", entry->d_name);
-- 
2.7.3

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]