tools: add data interface type
Add data interface type to the object, to allow checking against what
stat() returns.
Change-Id: I72aed1ffbca63dbfb003359c4bbe570f966a8649
Signed-off-by: Patrick Venture <venture@google.com>
diff --git a/tools/updater.cpp b/tools/updater.cpp
index 7b5ec0f..a7f9c96 100644
--- a/tools/updater.cpp
+++ b/tools/updater.cpp
@@ -44,6 +44,11 @@
* is supported.
*/
auto stat = blob->getStat(goalFirmware);
+ if ((stat.blob_state & handler->supportedType()) == 0)
+ {
+ std::fprintf(stderr, "data interface selected not supported.\n");
+ return -1; /* throw custom exception. */
+ }
return 0;
}