File tree Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -205,7 +205,7 @@ class VpdTool
205205 *
206206 * @return On success returns 0, otherwise returns -1.
207207 */
208- int dumpObject (const std::string& i_fruPath) const noexcept ;
208+ int dumpObject (std::string i_fruPath) const noexcept ;
209209
210210 /* *
211211 * @brief API to fix system VPD keywords.
Original file line number Diff line number Diff line change @@ -89,11 +89,14 @@ int VpdTool::readKeyword(const std::string& i_vpdPath,
8989 return l_rc;
9090}
9191
92- int VpdTool::dumpObject (const std::string& i_fruPath) const noexcept
92+ int VpdTool::dumpObject (std::string i_fruPath) const noexcept
9393{
9494 int l_rc{constants::FAILURE};
9595 try
9696 {
97+ // ToDo: For PFuture system take only full path from the user.
98+ i_fruPath = constants::baseInventoryPath + i_fruPath;
99+
97100 nlohmann::json l_resultJsonArray = nlohmann::json::array ({});
98101 const nlohmann::json l_fruJson = getFruProperties (i_fruPath);
99102 if (!l_fruJson.empty ())
@@ -104,16 +107,16 @@ int VpdTool::dumpObject(const std::string& i_fruPath) const noexcept
104107 }
105108 else
106109 {
107- std::cout << " FRU " << i_fruPath << " is not present in the system "
108- << std::endl;
110+ std::cout << " FRU [ " << i_fruPath
111+ << " ] is not present in the system " << std::endl;
109112 }
110113 l_rc = constants::SUCCESS;
111114 }
112115 catch (std::exception& l_ex)
113116 {
114117 // TODO: Enable logging when verbose is enabled.
115- // std::cerr << "Dump Object failed for FRU: " << i_fruPath
116- // << " Error: " << l_ex.what() << std::endl;
118+ // std::cerr << "Dump Object failed for FRU [ " << i_fruPath
119+ // << "], Error: " << l_ex.what() << std::endl;
117120 }
118121 return l_rc;
119122}
You can’t perform that action at this time.
0 commit comments