]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
Allow configs to start with a dot
authorJán Tomko <jtomko@redhat.com>
Tue, 21 Jun 2016 15:40:37 +0000 (17:40 +0200)
committerJán Tomko <jtomko@redhat.com>
Thu, 23 Jun 2016 19:58:38 +0000 (21:58 +0200)
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
src/conf/nwfilter_conf.c
src/conf/storage_conf.c
src/conf/virdomainobjlist.c
src/qemu/qemu_driver.c

index 1e4b7198b27b38cf670f4c9f713ad53e041311f2..e9f2f79321d2992da53015679c98d551ec13df1d 100644 (file)
@@ -3248,9 +3248,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;
 
@@ -3283,9 +3280,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;
 
index 56f8b86f7108d1cef83608e508f8954d5b01a261..db92f7cd493898171fc46657be377b8026e5bc9b 100644 (file)
@@ -3216,9 +3216,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;
 
index 5c044d26534bdd3bc54db55d77672edf0b903193..3c1fd02e92e17c00290bbf23b885bf975d4d3697 100644 (file)
@@ -1953,9 +1953,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;
 
@@ -1991,9 +1988,6 @@ virStoragePoolLoadAllConfigs(virStoragePoolObjListPtr pools,
         char *autostartLink;
         virStoragePoolObjPtr pool;
 
-        if (entry->d_name[0] == '.')
-            continue;
-
         if (!virFileHasSuffix(entry->d_name, ".xml"))
             continue;
 
index 4f7756d64e8d8d4abcfbd9d022163f6c14f0b1b2..46763f91bc8ab39372b07db713a78829ff2c33ae 100644 (file)
@@ -583,9 +583,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;
 
index 9657b553a930af771f2c0da186133f61b8b669a9..9973392ca8e9a819ee73c07d49accff614010ab1 100644 (file)
@@ -510,9 +510,6 @@ qemuDomainSnapshotLoad(virDomainObjPtr vm,
     }
 
     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);