summaryrefslogtreecommitdiffstats
path: root/src/ipmiblob
diff options
context:
space:
mode:
authorPatrick Venture <venture@google.com>2019-05-20 19:11:04 -0700
committerPatrick Venture <venture@google.com>2019-05-20 19:24:10 -0700
commit444746495ad3f951cb093c7144b7cb9218b8599f (patch)
tree2ae893be5a4ad67f04ffb9f87170aefe8b1e0677 /src/ipmiblob
parent99400c82a40d334cab04100a58a6b0aa74c21b0b (diff)
downloadipmi-blob-tool-444746495ad3f951cb093c7144b7cb9218b8599f.tar.gz
ipmi-blob-tool-444746495ad3f951cb093c7144b7cb9218b8599f.zip
move blob command enum to blob_interface header
Move the blob command enum to the blob_interface header that can be safely included by other code. Change-Id: If7c613cac9bdd460fc9a6cb3b59e4fc0dd3a861d Signed-off-by: Patrick Venture <venture@google.com>
Diffstat (limited to 'src/ipmiblob')
-rw-r--r--src/ipmiblob/blob_handler.cpp2
-rw-r--r--src/ipmiblob/blob_handler.hpp15
-rw-r--r--src/ipmiblob/blob_interface.hpp15
3 files changed, 16 insertions, 16 deletions
diff --git a/src/ipmiblob/blob_handler.cpp b/src/ipmiblob/blob_handler.cpp
index 2b79e19..039b7e0 100644
--- a/src/ipmiblob/blob_handler.cpp
+++ b/src/ipmiblob/blob_handler.cpp
@@ -48,7 +48,7 @@ std::vector<std::uint8_t>
std::copy(ipmiPhosphorOen.begin(), ipmiPhosphorOen.end(),
std::back_inserter(request));
- request.push_back(command);
+ request.push_back(static_cast<std::uint8_t>(command));
if (payload.size() > 0)
{
diff --git a/src/ipmiblob/blob_handler.hpp b/src/ipmiblob/blob_handler.hpp
index 5e24b91..68708d8 100644
--- a/src/ipmiblob/blob_handler.hpp
+++ b/src/ipmiblob/blob_handler.hpp
@@ -11,21 +11,6 @@ namespace ipmiblob
class BlobHandler : public BlobInterface
{
public:
- enum BlobOEMCommands
- {
- bmcBlobGetCount = 0,
- bmcBlobEnumerate = 1,
- bmcBlobOpen = 2,
- bmcBlobRead = 3,
- bmcBlobWrite = 4,
- bmcBlobCommit = 5,
- bmcBlobClose = 6,
- bmcBlobDelete = 7,
- bmcBlobStat = 8,
- bmcBlobSessionStat = 9,
- bmcBlobWriteMeta = 10,
- };
-
/**
* Create a BlobInterface pointer for use given an ipmi handler.
*
diff --git a/src/ipmiblob/blob_interface.hpp b/src/ipmiblob/blob_interface.hpp
index 26ca837..fbd8c6a 100644
--- a/src/ipmiblob/blob_interface.hpp
+++ b/src/ipmiblob/blob_interface.hpp
@@ -7,6 +7,21 @@
namespace ipmiblob
{
+enum class BlobOEMCommands : std::uint8_t
+{
+ bmcBlobGetCount = 0,
+ bmcBlobEnumerate = 1,
+ bmcBlobOpen = 2,
+ bmcBlobRead = 3,
+ bmcBlobWrite = 4,
+ bmcBlobCommit = 5,
+ bmcBlobClose = 6,
+ bmcBlobDelete = 7,
+ bmcBlobStat = 8,
+ bmcBlobSessionStat = 9,
+ bmcBlobWriteMeta = 10,
+};
+
struct StatResponse
{
std::uint16_t blob_state;
OpenPOWER on IntegriCloud