summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoleslaw Ogonczyk Makowski <boleslawx.ogonczyk-makowski@intel.com>2023-04-14 16:32:40 +0300
committerEd Tanous <ed@tanous.net>2023-04-25 19:21:44 +0300
commit5880f0c5ac700a78abf6b2a89afe5030a8d2f825 (patch)
tree18d1549fdbdb41b5921a6f77b66254efa433fe49
parent72e21377372245b076c151f62a141153ab318bdd (diff)
downloadbmcweb-5880f0c5ac700a78abf6b2a89afe5030a8d2f825.tar.xz
Fix regression in virtual media
VmMode::Proxy was being checked incorrectly in [1] instead of VmMode::Legacy which didn't allow mounting in legacy mode. Removing return in [2] caused the code to display an error while unmounting even when unmounted successfully. Tested: Can mount in legacy mode Unmounting successfully in legacy mode doesn't display an error [1]: https://github.com/openbmc/bmcweb/commit/365a73f4725a6cefa3d69168ae5500fd05ff8866#diff-3d181e155cfa7f397eface92af17130f3db87773ce4219d9c7e24e00b76b94acR865 [2]: https://github.com/openbmc/bmcweb/commit/365a73f4725a6cefa3d69168ae5500fd05ff8866#diff-3d181e155cfa7f397eface92af17130f3db87773ce4219d9c7e24e00b76b94acL956 Change-Id: I522369cfd81ca084c7379ff97371f8a292950849 Signed-off-by: Boleslaw Ogonczyk Makowski <boleslawx.ogonczyk-makowski@intel.com>
-rw-r--r--redfish-core/lib/virtual_media.hpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/redfish-core/lib/virtual_media.hpp b/redfish-core/lib/virtual_media.hpp
index 88bdb215b2..bb17d3f8df 100644
--- a/redfish-core/lib/virtual_media.hpp
+++ b/redfish-core/lib/virtual_media.hpp
@@ -881,7 +881,7 @@ inline void handleManagersVirtualMediaActionInsertPost(
for (const auto& object : subtree)
{
VmMode mode = parseObjectPathAndGetMode(object.first, resName);
- if (mode == VmMode::Proxy)
+ if (mode == VmMode::Legacy)
{
validateParams(asyncResp, service, resName, actionParams);
@@ -948,6 +948,7 @@ inline void handleManagersVirtualMediaActionEject(
{
doEjectAction(asyncResp, service, resName,
mode == VmMode::Legacy);
+ return;
}
}
BMCWEB_LOG_DEBUG << "Parent item not found";