bmc: move away from blobs namespace

The blobs namespace is really owned by phosphor-ipmi-blobs.  Move all
phosphor-ipmi-flash objects into ipmi_flash namespace.

Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: I51b721ad4f3cdc4cc43846c942967ed2e5f16589
diff --git a/tools/bt.hpp b/tools/bt.hpp
index 811c81d..9caac5d 100644
--- a/tools/bt.hpp
+++ b/tools/bt.hpp
@@ -17,9 +17,9 @@
         sys(sys){};
 
     bool sendContents(const std::string& input, std::uint16_t session) override;
-    blobs::FirmwareBlobHandler::UpdateFlags supportedType() const override
+    ipmi_flash::FirmwareBlobHandler::UpdateFlags supportedType() const override
     {
-        return blobs::FirmwareBlobHandler::UpdateFlags::ipmi;
+        return ipmi_flash::FirmwareBlobHandler::UpdateFlags::ipmi;
     }
 
   private:
diff --git a/tools/interface.hpp b/tools/interface.hpp
index 4a72313..ae341ec 100644
--- a/tools/interface.hpp
+++ b/tools/interface.hpp
@@ -30,7 +30,8 @@
      *
      * @return the enum value corresponding to the supported type.
      */
-    virtual blobs::FirmwareBlobHandler::UpdateFlags supportedType() const = 0;
+    virtual ipmi_flash::FirmwareBlobHandler::UpdateFlags
+        supportedType() const = 0;
 };
 
 } // namespace host_tool
diff --git a/tools/lpc.hpp b/tools/lpc.hpp
index fc8ca4b..bdcf7be 100644
--- a/tools/lpc.hpp
+++ b/tools/lpc.hpp
@@ -27,9 +27,9 @@
         io(io), sys(sys){};
 
     bool sendContents(const std::string& input, std::uint16_t session) override;
-    blobs::FirmwareBlobHandler::UpdateFlags supportedType() const override
+    ipmi_flash::FirmwareBlobHandler::UpdateFlags supportedType() const override
     {
-        return blobs::FirmwareBlobHandler::UpdateFlags::lpc;
+        return ipmi_flash::FirmwareBlobHandler::UpdateFlags::lpc;
     }
 
   private:
diff --git a/tools/p2a.cpp b/tools/p2a.cpp
index 2a48285..2593503 100644
--- a/tools/p2a.cpp
+++ b/tools/p2a.cpp
@@ -81,14 +81,14 @@
 
     /* Read the configuration via blobs metadata (stat). */
     ipmiblob::StatResponse stat = blob->getStat(session);
-    if (stat.metadata.size() != sizeof(blobs::PciConfigResponse))
+    if (stat.metadata.size() != sizeof(ipmi_flash::PciConfigResponse))
     {
         std::fprintf(stderr, "Didn't receive expected size of metadata for "
                              "PCI Configuration response\n");
         return false;
     }
 
-    blobs::PciConfigResponse pciResp;
+    ipmi_flash::PciConfigResponse pciResp;
     std::memcpy(&pciResp, stat.metadata.data(), sizeof(pciResp));
     std::fprintf(stderr, "Received address: 0x%x\n", pciResp.address);
 
@@ -140,7 +140,7 @@
                 /* Ok, so the data is staged, now send the blob write with the
                  * details.
                  */
-                struct blobs::ExtChunkHdr chunk;
+                struct ipmi_flash::ExtChunkHdr chunk;
                 chunk.length = bytesRead;
                 std::vector<std::uint8_t> chunkBytes(sizeof(chunk));
                 std::memcpy(chunkBytes.data(), &chunk, sizeof(chunk));
diff --git a/tools/p2a.hpp b/tools/p2a.hpp
index eda8f61..920422f 100644
--- a/tools/p2a.hpp
+++ b/tools/p2a.hpp
@@ -30,9 +30,9 @@
     }
 
     bool sendContents(const std::string& input, std::uint16_t session) override;
-    blobs::FirmwareBlobHandler::UpdateFlags supportedType() const override
+    ipmi_flash::FirmwareBlobHandler::UpdateFlags supportedType() const override
     {
-        return blobs::FirmwareBlobHandler::UpdateFlags::p2a;
+        return ipmi_flash::FirmwareBlobHandler::UpdateFlags::p2a;
     }
 
   private:
diff --git a/tools/updater.cpp b/tools/updater.cpp
index d596483..afef26e 100644
--- a/tools/updater.cpp
+++ b/tools/updater.cpp
@@ -117,7 +117,8 @@
     static constexpr int commandAttempts = 20;
     int attempts = 0;
     bool exitLoop = false;
-    blobs::VerifyCheckResponses result = blobs::VerifyCheckResponses::other;
+    ipmi_flash::VerifyCheckResponses result =
+        ipmi_flash::VerifyCheckResponses::other;
 
     try
     {
@@ -136,21 +137,22 @@
                 std::fprintf(stderr, "Received invalid metadata response!!!\n");
             }
 
-            result = static_cast<blobs::VerifyCheckResponses>(resp.metadata[0]);
+            result =
+                static_cast<ipmi_flash::VerifyCheckResponses>(resp.metadata[0]);
 
             switch (result)
             {
-                case blobs::VerifyCheckResponses::failed:
+                case ipmi_flash::VerifyCheckResponses::failed:
                     std::fprintf(stderr, "failed\n");
                     exitLoop = true;
                     break;
-                case blobs::VerifyCheckResponses::other:
+                case ipmi_flash::VerifyCheckResponses::other:
                     std::fprintf(stderr, "other\n");
                     break;
-                case blobs::VerifyCheckResponses::running:
+                case ipmi_flash::VerifyCheckResponses::running:
                     std::fprintf(stderr, "running\n");
                     break;
-                case blobs::VerifyCheckResponses::success:
+                case ipmi_flash::VerifyCheckResponses::success:
                     std::fprintf(stderr, "success\n");
                     exitLoop = true;
                     break;
@@ -180,7 +182,7 @@
      * which exceptions from the lower layers allow one to try and delete the
      * blobs to rollback the state and progress.
      */
-    return (result == blobs::VerifyCheckResponses::success);
+    return (result == ipmi_flash::VerifyCheckResponses::success);
 }
 
 bool UpdateHandler::verifyFile(const std::string& target)
@@ -237,7 +239,8 @@
     /* TODO(venture): Add optional parameter to specify the flash type, default
      * to legacy for now.
      */
-    bool goalSupported = updater->checkAvailable(blobs::staticLayoutBlobId);
+    bool goalSupported =
+        updater->checkAvailable(ipmi_flash::staticLayoutBlobId);
     if (!goalSupported)
     {
         throw ToolException("Goal firmware or interface not supported");
@@ -247,15 +250,15 @@
 
     /* Send over the firmware image. */
     std::fprintf(stderr, "Sending over the firmware image.\n");
-    updater->sendFile(blobs::staticLayoutBlobId, imagePath);
+    updater->sendFile(ipmi_flash::staticLayoutBlobId, imagePath);
 
     /* Send over the hash contents. */
     std::fprintf(stderr, "Sending over the hash file.\n");
-    updater->sendFile(blobs::hashBlobId, signaturePath);
+    updater->sendFile(ipmi_flash::hashBlobId, signaturePath);
 
     /* Trigger the verification by opening the verify file. */
     std::fprintf(stderr, "Opening the verification file\n");
-    if (updater->verifyFile(blobs::verifyBlobId))
+    if (updater->verifyFile(ipmi_flash::verifyBlobId))
     {
         std::fprintf(stderr, "succeeded\n");
     }