/openbmc/phosphor-bmc-code-mgmt/bmc/ |
H A D | download_manager.cpp | 32 void Download::downloadViaTFTP(std::string fileName, std::string serverAddress) in downloadViaTFTP() argument 37 if (!fileName.empty()) in downloadViaTFTP() 39 fileName.erase(std::remove(fileName.begin(), fileName.end(), '/'), in downloadViaTFTP() 40 fileName.end()); in downloadViaTFTP() 41 fileName = fileName.substr(fileName.find_first_not_of('.')); in downloadViaTFTP() 44 if (fileName.empty()) in downloadViaTFTP() 48 Argument::ARGUMENT_VALUE(fileName.c_str())); in downloadViaTFTP() 60 info("Downloading {PATH} via TFTP: {SERVERADDRESS}", "PATH", fileName, in downloadViaTFTP() 82 execl("/usr/bin/tftp", "tftp", "-g", "-r", fileName.c_str(), in downloadViaTFTP() 84 (std::string{IMG_UPLOAD_DIR} + '/' + fileName).c_str(), in downloadViaTFTP()
|
/openbmc/phosphor-power/phosphor-power-sequencer/src/ |
H A D | pmbus_driver_device.cpp | 60 std::string fileName = std::format("status{:d}", page); in getStatusWord() local 61 value = pmbusInterface->read(fileName, Type::Debug); in getStatusWord() 77 std::string fileName = std::format("status{:d}_vout", page); in getStatusVout() local 78 value = pmbusInterface->read(fileName, Type::Debug); in getStatusVout() 95 std::string fileName = std::format("in{}_input", fileNumber); in getReadVout() local 97 pmbusInterface->readString(fileName, Type::Hwmon); in getReadVout() 116 std::string fileName = std::format("in{}_lcrit", fileNumber); in getVoutUVFaultLimit() local 118 pmbusInterface->readString(fileName, Type::Hwmon); in getVoutUVFaultLimit() 161 std::string fileName; in buildPageToFileNumberMap() local 167 fileName = f.path().filename().string(); in buildPageToFileNumberMap() [all …]
|
H A D | config_file_parser.cpp | 39 std::string fileName; in find() local 45 fileName = systemType + ".json"; in find() 46 possiblePath = configFileDir / fileName; in find() 58 fileName = systemType.substr(pos + 1) + ".json"; in find() 59 possiblePath = configFileDir / fileName; in find()
|
H A D | ucd90x_device.cpp | 35 std::string fileName{"mfr_status"}; in getMfrStatus() local 36 value = pmbusInterface->read(fileName, Type::HwmonDeviceDebug); in getMfrStatus()
|
/openbmc/phosphor-power/tools/power-utils/ |
H A D | version.cpp | 78 std::string fileName; in getVersionInfo() local 84 fileName = fru["fileName"]; in getVersionInfo() 88 if (fileName.empty()) in getVersionInfo() 93 return std::make_tuple(*devicePath, type, fileName); in getVersionInfo() 110 const auto [devicePath, type, fileName] = getVersionInfo(psuInventoryPath); in getVersionJson() 114 if (!devicePath.empty() && !fileName.empty()) in getVersionJson() 117 version = pmbus.readString(fileName, type); in getVersionJson()
|
H A D | model.cpp | 86 std::string fileName; in getModelJson() local 92 fileName = fru["fileName"]; in getModelJson() 96 if (fileName.empty()) in getModelJson() 106 std::string model = pmbus.readString(fileName, type); in getModelJson() 130 std::string fileName = "ccin"; in getModelDbus() local 132 std::string model = pmbus->readString(fileName, type); in getModelDbus()
|
H A D | updater.cpp | 120 bool validateFWFile(const std::string& fileName) in validateFWFile() argument 123 if (!std::filesystem::exists(fileName)) in validateFWFile() 125 lg2::error("Firmware file not found: {FILE}", "FILE", fileName); in validateFWFile() 130 auto fileSize = std::filesystem::file_size(fileName); in validateFWFile() 133 lg2::error("Firmware {FILE} is empty", "FILE", fileName); in validateFWFile() 140 std::unique_ptr<std::ifstream> openFirmwareFile(const std::string& fileName) in openFirmwareFile() argument 142 if (fileName.empty()) in openFirmwareFile() 148 std::make_unique<std::ifstream>(fileName, std::ios::binary); in openFirmwareFile() 151 lg2::error("Failed to open firmware file: {FILE}", "FILE", fileName); in openFirmwareFile()
|
/openbmc/phosphor-fan-presence/ |
H A D | json_config.hpp | 70 NoConfigFound(const std::string& appName, const std::string& fileName) : in NoConfigFound() argument 73 appName, fileName) in NoConfigFound() 247 const std::string& fileName, in getConfFile() argument 251 fs::path confFile = fs::path{confOverridePath} / appName / fileName; in getConfFile() 258 confFile = fs::path{confBasePath} / appName / fileName; in getConfFile() 268 [&confFile, &appName, &fileName](const auto& value) { in getConfFile() 269 confFile = fs::path{confBasePath} / appName / value / fileName; in getConfFile() 281 throw NoConfigFound(appName, fileName); in getConfFile()
|
/openbmc/telemetry/tests/src/ |
H A D | test_persistent_json_storage.cpp | 30 const FilePath fileName = FilePath("report/1/file.txt"); member in TestPersistentJsonStorage 47 sut.store(fileName, data); in TEST_F() 49 ASSERT_THAT(sut.load(fileName), Eq(data)); in TEST_F() 101 sut.store(fileName, data); in TEST_F() 103 ASSERT_THAT(sut.remove(fileName), Eq(true)); in TEST_F() 104 ASSERT_THAT(sut.load(fileName), Eq(std::nullopt)); in TEST_F() 109 ASSERT_THAT(sut.remove(fileName), Eq(false)); in TEST_F() 114 ASSERT_THAT(sut.load(fileName), Eq(std::nullopt)); in TEST_F()
|
/openbmc/phosphor-snmp/ |
H A D | snmp_conf_manager.cpp | 103 fs::path fileName = dbusPersistentLocation; in deleteSNMPClient() local 104 fileName /= std::to_string(id); in deleteSNMPClient() 106 if (fs::exists(fileName)) in deleteSNMPClient() 108 if (!fs::remove(fileName, ec)) in deleteSNMPClient() 110 lg2::error("Unable to delete {FILE}: {EC}", "FILE", fileName, "EC", in deleteSNMPClient() 116 lg2::error("{FILE} doesn't exist", "FILE", fileName); in deleteSNMPClient()
|
H A D | snmp_serialize.cpp | 61 fs::path fileName = dir; in serialize() local 63 fileName /= std::to_string(id); in serialize() 65 std::ofstream os(fileName.string(), std::ios::binary); in serialize() 68 return fileName; in serialize()
|
/openbmc/google-misc/subprojects/metrics-ipmi-blobs/test/ |
H A D | util_test.cpp | 40 const std::string& fileName = "./test_file"; in TEST() local 41 std::ofstream ofs(fileName, std::ios::trunc); in TEST() 45 std::string readContent = metric_blob::readFileThenGrepIntoString(fileName); in TEST() 46 std::filesystem::remove(fileName); in TEST() 52 const std::string& fileName = "./inexistent_file"; in TEST() local 53 std::string readContent = metric_blob::readFileThenGrepIntoString(fileName); in TEST()
|
/openbmc/libbej/test/include/ |
H A D | bej_common_test.hpp | 36 std::streamsize readBinaryFile(const char* fileName, std::span<uint8_t> buffer) in readBinaryFile() argument 38 std::ifstream inputStream(fileName, std::ios::binary); in readBinaryFile() 41 std::cerr << "Cannot open file: " << fileName << "\n"; in readBinaryFile() 48 std::cerr << "Failed to read the complete file: " << fileName in readBinaryFile()
|
/openbmc/google-ipmi-sys/ |
H A D | util.cpp | 59 std::string readPropertyFile(const std::string& fileName) in readPropertyFile() argument 61 std::ifstream ifs(fileName); in readPropertyFile() 66 auto msg = std::string("Unable to open file ") + fileName.c_str(); in readPropertyFile() 85 stdplus::print(stderr, "Unable to read file {}.\n", fileName); in readPropertyFile()
|
/openbmc/phosphor-mrw-tools/ |
H A D | gen_led_groups.pl | 257 my $fileName = $outputFile; 260 open(my $fh, '>', $fileName) or die "Could not open file '$fileName' $!"; 345 my $fileName = $outputFile; 346 open(my $fh, '>', $fileName) or die "Could not open file '$fileName' $!";
|
H A D | gen_occ_map.pl | 87 my $fileName = $outputFile; 88 open(my $fh, '>', $fileName) or die "Could not open file '$fileName' $!";
|
/openbmc/bmcweb/include/ibm/ |
H A D | management_console_rest.hpp | 388 inline bool isValidConfigFileName(const std::string& fileName, in isValidConfigFileName() argument 391 if (fileName.empty()) in isValidConfigFileName() 400 std::size_t found = fileName.find_first_not_of( in isValidConfigFileName() 404 BMCWEB_LOG_ERROR("Unsupported character in filename: {}", fileName); in isValidConfigFileName() 410 if (fileName.length() > 20) in isValidConfigFileName() 414 fileName.length()); in isValidConfigFileName() 464 const std::string& fileName) { in requestRoutes() argument 465 BMCWEB_LOG_DEBUG("ConfigFile : {}", fileName); in requestRoutes() 467 if (!isValidConfigFileName(fileName, asyncResp->res)) in requestRoutes() 473 handleFileUrl(req, asyncResp, fileName); in requestRoutes()
|
/openbmc/openbmc/meta-security/dynamic-layers/meta-perl/recipes-security/bastille/files/ |
H A D | AccountPermission.pm | 677 my ($fileName, $owner, $group) = @_; 679 if (-e $fileName) { 680 my @junk=stat ($fileName); 749 my ($fileName, $reqdPerms) = @_; 753 if (-e $fileName) { 754 if (stat($fileName)) { 755 $filePerms = (stat($fileName))[2] & 07777; 758 &B_log ("ERROR", "Can't stat $fileName.\n");
|
/openbmc/phosphor-host-ipmid/ |
H A D | storageaddsel.cpp | 25 std::string readESEL(const char* fileName) in readESEL() argument 28 std::ifstream handle(fileName); in readESEL() 33 fileName); in readESEL()
|
/openbmc/phosphor-logging/extensions/openpower-pels/tools/ |
H A D | peltool.cpp | 76 uint64_t fileNameToTimestamp(const std::string& fileName) in fileNameToTimestamp() argument 78 std::string token = fileName.substr(0, fileName.find("_")); in fileNameToTimestamp() 172 uint32_t fileNameToPELId(const std::string& fileName) in fileNameToPELId() argument 177 num = std::stoul(fileName.substr(fileName.find("_") + 1), 0, 16); in fileNameToPELId() 322 auto fileName = (archive ? pelLogDir() + "/archive" : pelLogDir()) + name; in genPELJSON() local 325 std::vector<uint8_t> data = getFileData(fileName); in genPELJSON() 329 entry("FILENAME=%s", fileName.c_str())); in genPELJSON() 456 entry("FILENAME=%s", fileName.c_str()), in genPELJSON() 844 std::string fileName; in main() local 862 app.add_option("--file", fileName, "Display a PEL using its Raw PEL file"); in main() [all …]
|
/openbmc/phosphor-hwmon/ |
H A D | sensorset.cpp | 37 auto fileName = file.path().filename(); in SensorSet() local 38 std::regex_search(fileName.native(), match, sensors_regex); in SensorSet()
|
/openbmc/webui-vue/src/components/Global/ |
H A D | TableToolbarExport.vue | 20 fileName: { 35 return `${this.fileName}.json`;
|
/openbmc/phosphor-power/phosphor-regulators/test/ |
H A D | validate-regulators-config_tests.cpp | 224 void writeDataToFile(const json configFileJson, std::string fileName) in writeDataToFile() argument 227 std::ofstream out(fileName); in writeDataToFile() 235 std::string fileName = tmpFile.getPath().string(); in expectJsonValid() local 236 writeDataToFile(configFileJson, fileName); in expectJsonValid() 238 EXPECT_FILE_VALID(fileName); in expectJsonValid() 246 std::string fileName = tmpFile.getPath().string(); in expectJsonInvalid() local 247 writeDataToFile(configFileJson, fileName); in expectJsonInvalid() 249 EXPECT_FILE_INVALID(fileName, expectedErrorMessage, expectedOutputMessage); in expectJsonInvalid() 3315 std::string fileName = tmpFile.getPath().string(); in TEST() local 3316 writeDataToFile(validConfigFile, fileName); in TEST() [all …]
|
/openbmc/openpower-occ-control/ |
H A D | powercap.cpp | 317 fs::path fileName = getPcapFilename(std::regex{"power\\d+_cap_user$"}); in writeOcc() local 318 if (fileName.empty()) in writeOcc() 330 std::ofstream file(fileName, std::ios::out); in writeOcc() 334 fileName); in writeOcc() 341 microWatts, "FILE", fileName, "ERR", errno); in writeOcc()
|
/openbmc/u-boot/tools/ |
H A D | img2srec.c | 227 static void ConvertELF(char* fileName, uint32_t loadOffset) in ConvertELF() argument 245 if ((file = fopen(fileName,"rb")) == NULL) { in ConvertELF() 246 fprintf (stderr, "Can't open %s: %s\n", fileName, strerror(errno)); in ConvertELF() 299 if ((hdr_name = strrchr(fileName, '/')) == NULL) { in ConvertELF() 300 hdr_name = fileName; in ConvertELF()
|