tools: blob: implement get blob stat command

The firmware update process requires implementing the stat command, so
that one can verify the firmware mechanism requested is available.

Change-Id: I582f344124767975ee305c420657f991d2223889
Signed-off-by: Patrick Venture <venture@google.com>
diff --git a/tools/updater.cpp b/tools/updater.cpp
index 817b6f1..7b5ec0f 100644
--- a/tools/updater.cpp
+++ b/tools/updater.cpp
@@ -27,8 +27,12 @@
      */
     std::string goalFirmware = "/flash/image";
 
+    /* Get list of blob_ids, check for /flash/image, or /flash/tarball.
+     * TODO(venture) the mechanism doesn't care, but the caller of burn_my_bmc
+     * will have in mind which they're sending and we need to verify it's
+     * available and use it.
+     */
     std::vector<std::string> blobs = blob->getBlobList();
-
     auto blobInst = std::find(blobs.begin(), blobs.end(), goalFirmware);
     if (blobInst == blobs.end())
     {
@@ -36,15 +40,10 @@
         return -1; /* throw custom exception. */
     }
 
-    /* Get list of blob_ids, check for /flash/image, or /flash/tarball.
-     * TODO(venture) the mechanism doesn't care, but the caller of burn_my_bmc
-     * will have in mind which they're sending and we need to verify it's
-     * available and use it.
-     */
-
     /* Call stat on /flash/image (or /flash/tarball) and check if data interface
      * is supported.
      */
+    auto stat = blob->getStat(goalFirmware);
 
     return 0;
 }