bmc: cleanup stat(blob) handler
Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: Icfe0562a3a80a2f146a168994cca65783cf942fd
diff --git a/firmware_handler.cpp b/firmware_handler.cpp
index ded5383..6ebc559 100644
--- a/firmware_handler.cpp
+++ b/firmware_handler.cpp
@@ -156,33 +156,23 @@
struct blobs::BlobMeta* meta)
{
/* We know we support this path because canHandle is called ahead */
- if (path == verifyBlobId)
+ if (path == verifyBlobId || path == activeImageBlobId ||
+ path == activeHashBlobId)
{
- /* TODO: We need to return information for the verify state -- did they
- * call commit() did things start?
+ /* These blobs are placeholders that indicate things, or allow actions,
+ * but are not stat-able as-is.
*/
- }
- else if (path == activeImageBlobId)
- {
- /* TODO: We need to return information for the image that's staged. */
- }
- else if (path == activeHashBlobId)
- {
- /* TODO: We need to return information for the hash that's staged. */
- }
- else
- {
- /* They are requesting information about the generic blob_id. */
- meta->blobState = bitmask;
- meta->size = 0;
-
- /* The generic blob_ids state is only the bits related to the transport
- * mechanisms.
- */
- return true;
+ return false;
}
- return false;
+ /* They are requesting information about the generic blob_id. */
+ meta->blobState = bitmask;
+ meta->size = 0;
+
+ /* The generic blob_ids state is only the bits related to the transport
+ * mechanisms.
+ */
+ return true;
}
/*