代码拉取完成,页面将自动刷新
#include "writefrudata.hpp"
#include <CLI/CLI.hpp>
#include <phosphor-logging/log.hpp>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <memory>
using namespace phosphor::logging;
//--------------------------------------------------------------------------
// This gets called by udev monitor soon after seeing hog plugs for EEPROMS.
//--------------------------------------------------------------------------
int main(int argc, char** argv)
{
int rc = 0;
uint8_t fruid;
std::string eeprom_file;
const int MAX_FRU_ID = 0xfe;
CLI::App app{"OpenBMC IPMI-FRU-Parser"};
app.add_option("-e,--eeprom", eeprom_file, "Absolute file name of eeprom")
->check(CLI::ExistingFile);
app.add_option("-f,--fruid", fruid, "valid fru id in integer")
->check(CLI::Range(0, MAX_FRU_ID));
// Read the arguments.
CLI11_PARSE(app, argc, argv);
// Now that we have the file that contains the eeprom data, go read it
// and update the Inventory DB.
auto bus = sdbusplus::bus::new_default();
bool bmc_fru = true;
rc = validateFRUArea(fruid, eeprom_file.c_str(), bus, bmc_fru);
return (rc < 0 ? EXIT_FAILURE : EXIT_SUCCESS);
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。