cleanup: drop default filesystem handler
Drop the default file system handler from the constructor and just pass
it in to the one place it's needed.
Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: I356adccbca583c20097e4e8977ce157ecd706f81
diff --git a/cleanup/main.cpp b/cleanup/main.cpp
index cfc3b63..0f82f4e 100644
--- a/cleanup/main.cpp
+++ b/cleanup/main.cpp
@@ -17,6 +17,7 @@
#include "config.h"
#include "cleanup.hpp"
+#include "fs.hpp"
#include "util.hpp"
#include <blobs-ipmid/blobs.hpp>
@@ -30,12 +31,15 @@
std::vector<std::string> files = {
STATIC_HANDLER_STAGED_NAME, TARBALL_STAGED_NAME, HASH_FILENAME,
VERIFY_STATUS_FILENAME, UPDATE_STATUS_FILENAME};
-}
+
+FileSystem fileSystemHelper;
+} // namespace ipmi_flash
extern "C" std::unique_ptr<blobs::GenericBlobInterface> createHandler()
{
auto handler = ipmi_flash::FileCleanupHandler::CreateCleanupHandler(
- ipmi_flash::cleanupBlobId, ipmi_flash::files);
+ ipmi_flash::cleanupBlobId, ipmi_flash::files,
+ &ipmi_flash::fileSystemHelper);
if (!handler)
{