Recover Add ipmi response buffer size check for all commands
Use the ipmi::Context channel to get the max transfer size to make sure
that we select the right size.
Also remove maximumReadSize since the max reply size is checked instead
We already check the max reply size so maximumReadSize is not needed
anymore. This will result in a bit of a different behavior when the size
exceed the max. It will not fail - instead, it will return up to the
max size.
Tested:
Work with ipmi config that doesn't support the default interface (13).
```
cat /usr/share/ipmi-providers/channel_config.json
{
"0": {
"name": "usb0",
"is_valid": true,
"active_sessions": 0,
"channel_info": {
"medium_type": "lan-802.3",
"protocol_type": "ipmb-1.0",
"session_supported": "multi-session",
"is_ipmi": true
}
},
"8": {
"name": "INTRABMC",
"is_valid": true,
"active_sessions": 0,
"channel_info": {
"medium_type": "oem",
"protocol_type": "oem",
"session_supported": "session-less",
"is_ipmi": true
}
},
"11": {
"name": "gbmcbr",
"is_valid": true,
"active_sessions": 0,
"channel_info": {
"medium_type": "lan-802.3",
"protocol_type": "ipmb-1.0",
"session_supported": "multi-session",
"is_ipmi": true
}
}
}
```
This read the blob count and always works now since it uses the right
interface to get the max transfer size.
```
ipmitool raw 46 128 207 194 0 0
cf c2 00 4a ac 0e 00 00 00
```
Change-Id: Ia65f80719a819e7d642eb7425463a56c179935ac
Signed-off-by: Willy Tu <wltu@google.com>
diff --git a/meson.build b/meson.build
index 1c5808d..21d113c 100644
--- a/meson.build
+++ b/meson.build
@@ -21,7 +21,11 @@
description: 'Phosphor Blob Transfer Interface',
version: meson.project_version())
+cpp = meson.get_compiler('cpp')
+
phosphor_logging_dep = dependency('phosphor-logging')
+ipmid_dep = dependency('libipmid')
+channellayer_dep = cpp.find_library('channellayer', required: true)
blob_manager_pre = declare_dependency(
dependencies: [
@@ -60,7 +64,8 @@
implicit_include_directories: false,
dependencies: [
blob_manager_dep,
- dependency('libipmid'),
+ ipmid_dep,
+ channellayer_dep,
],
install: true,
install_dir: get_option('libdir') / 'ipmid-providers')