mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-08 22:15:21 +00:00
Allow configs to start with a dot
This fixes the disappearance of domains and networks starting with a dot. https://bugzilla.redhat.com/show_bug.cgi?id=1333248
This commit is contained in:
parent
dad2f010b0
commit
5217fe3db4
@ -3248,9 +3248,6 @@ virNetworkLoadAllState(virNetworkObjListPtr nets,
|
|||||||
while ((ret = virDirRead(dir, &entry, stateDir)) > 0) {
|
while ((ret = virDirRead(dir, &entry, stateDir)) > 0) {
|
||||||
virNetworkObjPtr net;
|
virNetworkObjPtr net;
|
||||||
|
|
||||||
if (entry->d_name[0] == '.')
|
|
||||||
continue;
|
|
||||||
|
|
||||||
if (!virFileStripSuffix(entry->d_name, ".xml"))
|
if (!virFileStripSuffix(entry->d_name, ".xml"))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
@ -3283,9 +3280,6 @@ int virNetworkLoadAllConfigs(virNetworkObjListPtr nets,
|
|||||||
while ((ret = virDirRead(dir, &entry, configDir)) > 0) {
|
while ((ret = virDirRead(dir, &entry, configDir)) > 0) {
|
||||||
virNetworkObjPtr net;
|
virNetworkObjPtr net;
|
||||||
|
|
||||||
if (entry->d_name[0] == '.')
|
|
||||||
continue;
|
|
||||||
|
|
||||||
if (!virFileStripSuffix(entry->d_name, ".xml"))
|
if (!virFileStripSuffix(entry->d_name, ".xml"))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
@ -3216,9 +3216,6 @@ virNWFilterLoadAllConfigs(virNWFilterObjListPtr nwfilters,
|
|||||||
while ((ret = virDirRead(dir, &entry, configDir)) > 0) {
|
while ((ret = virDirRead(dir, &entry, configDir)) > 0) {
|
||||||
virNWFilterObjPtr nwfilter;
|
virNWFilterObjPtr nwfilter;
|
||||||
|
|
||||||
if (entry->d_name[0] == '.')
|
|
||||||
continue;
|
|
||||||
|
|
||||||
if (!virFileStripSuffix(entry->d_name, ".xml"))
|
if (!virFileStripSuffix(entry->d_name, ".xml"))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
@ -1953,9 +1953,6 @@ virStoragePoolLoadAllState(virStoragePoolObjListPtr pools,
|
|||||||
while ((ret = virDirRead(dir, &entry, stateDir)) > 0) {
|
while ((ret = virDirRead(dir, &entry, stateDir)) > 0) {
|
||||||
virStoragePoolObjPtr pool;
|
virStoragePoolObjPtr pool;
|
||||||
|
|
||||||
if (entry->d_name[0] == '.')
|
|
||||||
continue;
|
|
||||||
|
|
||||||
if (!virFileStripSuffix(entry->d_name, ".xml"))
|
if (!virFileStripSuffix(entry->d_name, ".xml"))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
@ -1991,9 +1988,6 @@ virStoragePoolLoadAllConfigs(virStoragePoolObjListPtr pools,
|
|||||||
char *autostartLink;
|
char *autostartLink;
|
||||||
virStoragePoolObjPtr pool;
|
virStoragePoolObjPtr pool;
|
||||||
|
|
||||||
if (entry->d_name[0] == '.')
|
|
||||||
continue;
|
|
||||||
|
|
||||||
if (!virFileHasSuffix(entry->d_name, ".xml"))
|
if (!virFileHasSuffix(entry->d_name, ".xml"))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
@ -583,9 +583,6 @@ virDomainObjListLoadAllConfigs(virDomainObjListPtr doms,
|
|||||||
while ((ret = virDirRead(dir, &entry, configDir)) > 0) {
|
while ((ret = virDirRead(dir, &entry, configDir)) > 0) {
|
||||||
virDomainObjPtr dom;
|
virDomainObjPtr dom;
|
||||||
|
|
||||||
if (entry->d_name[0] == '.')
|
|
||||||
continue;
|
|
||||||
|
|
||||||
if (!virFileStripSuffix(entry->d_name, ".xml"))
|
if (!virFileStripSuffix(entry->d_name, ".xml"))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
@ -510,9 +510,6 @@ qemuDomainSnapshotLoad(virDomainObjPtr vm,
|
|||||||
}
|
}
|
||||||
|
|
||||||
while ((direrr = virDirRead(dir, &entry, NULL)) > 0) {
|
while ((direrr = virDirRead(dir, &entry, NULL)) > 0) {
|
||||||
if (entry->d_name[0] == '.')
|
|
||||||
continue;
|
|
||||||
|
|
||||||
/* NB: ignoring errors, so one malformed config doesn't
|
/* NB: ignoring errors, so one malformed config doesn't
|
||||||
kill the whole process */
|
kill the whole process */
|
||||||
VIR_INFO("Loading snapshot file '%s'", entry->d_name);
|
VIR_INFO("Loading snapshot file '%s'", entry->d_name);
|
||||||
|
Loading…
Reference in New Issue
Block a user