]> git.ipfire.org Git - thirdparty/squid.git/blobdiff - src/StoreFileSystem.cc
Source Format Enforcement (#763)
[thirdparty/squid.git] / src / StoreFileSystem.cc
index 0a1d365d49d14619bb3e4fb07f8b090ddba7d003..fc5981b9f49e62db68425c2bff5ed9e84cc9dc22 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1996-2015 The Squid Software Foundation and contributors
+ * Copyright (C) 1996-2021 The Squid Software Foundation and contributors
  *
  * Squid software is distributed under GPLv2+ license and includes
  * contributions from numerous individuals and organizations.
@@ -70,6 +70,16 @@ StoreFileSystem::FreeAllFs()
     }
 }
 
+StoreFileSystem *
+StoreFileSystem::FindByType(const char *type)
+{
+    for (const auto fs: FileSystems()) {
+        if (strcasecmp(type, fs->type()) == 0)
+            return fs;
+    }
+    return nullptr;
+}
+
 /* no filesystem is required to export statistics */
 void
 StoreFileSystem::registerWithCacheManager(void)