1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-09-22 13:44:18 +03:00

Don't bother to write out an empty cache.

This commit is contained in:
Alasdair Kergon
2002-01-24 23:17:16 +00:00
parent b849de1d18
commit c50c2886f7

View File

@@ -142,6 +142,11 @@ int persistent_filter_dump(struct dev_filter *f)
FILE *fp; FILE *fp;
if (!hash_get_num_entries(pf->devices)) {
log_very_verbose("Internal persistent device cache empty "
"- not writing to %s", pf->file);
return 0;
}
log_very_verbose("Dumping persistent device cache to %s", pf->file); log_very_verbose("Dumping persistent device cache to %s", pf->file);
fp = fopen(pf->file, "w"); fp = fopen(pf->file, "w");