Home
last modified time | relevance | path

Searched refs:fileName (Results 1 – 25 of 64) sorted by relevance

123

/openbmc/phosphor-bmc-code-mgmt/bmc/
H A Ddownload_manager.cpp32 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 Dpmbus_driver_device.cpp60 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 Ducd90x_device.cpp35 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 Dversion.cpp77 std::string fileName; in getVersionInfo() local
83 fileName = fru["fileName"]; in getVersionInfo()
87 if (fileName.empty()) in getVersionInfo()
92 return std::make_tuple(*devicePath, type, fileName); in getVersionInfo()
109 const auto [devicePath, type, fileName] = getVersionInfo(psuInventoryPath); in getVersionJson()
113 if (!devicePath.empty() && !fileName.empty()) in getVersionJson()
116 version = pmbus.readString(fileName, type); in getVersionJson()
H A Dmodel.cpp85 std::string fileName; in getModelJson() local
91 fileName = fru["fileName"]; in getModelJson()
95 if (fileName.empty()) in getModelJson()
105 std::string model = pmbus.readString(fileName, type); in getModelJson()
129 std::string fileName = "ccin"; in getModelDbus() local
131 std::string model = pmbus->readString(fileName, type); in getModelDbus()
H A Dupdater.cpp120 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 Djson_config.hpp69 NoConfigFound(const std::string& appName, const std::string& fileName) : in NoConfigFound() argument
72 appName, fileName) in NoConfigFound()
246 const std::string& fileName, in getConfFile() argument
250 fs::path confFile = fs::path{confOverridePath} / appName / fileName; in getConfFile()
257 confFile = fs::path{confBasePath} / appName / fileName; in getConfFile()
267 [&confFile, &appName, &fileName](const auto& value) { in getConfFile()
268 confFile = fs::path{confBasePath} / appName / value / fileName; in getConfFile()
280 throw NoConfigFound(appName, fileName); in getConfFile()
/openbmc/phosphor-snmp/
H A Dsnmp_conf_manager.cpp103 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 Dsnmp_serialize.cpp61 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/telemetry/tests/src/
H A Dtest_persistent_json_storage.cpp30 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/google-misc/subprojects/metrics-ipmi-blobs/test/
H A Dutil_test.cpp40 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/google-ipmi-sys/
H A Dutil.cpp59 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 Dgen_occ_map.pl87 my $fileName = $outputFile;
88 open(my $fh, '>', $fileName) or die "Could not open file '$fileName' $!";
H A Dgen_led_groups.pl257 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' $!";
/openbmc/libbej/test/include/
H A Dbej_common_test.hpp39 std::streamsize readBinaryFile(const char* fileName, std::span<uint8_t> buffer) in readBinaryFile() argument
41 std::ifstream inputStream(fileName, std::ios::binary); in readBinaryFile()
44 std::cerr << "Cannot open file: " << fileName << "\n"; in readBinaryFile()
51 std::cerr << "Failed to read the complete file: " << fileName in readBinaryFile()
/openbmc/phosphor-host-ipmid/
H A Dstorageaddsel.cpp25 std::string readESEL(const char* fileName) in readESEL() argument
28 std::ifstream handle(fileName); in readESEL()
33 fileName); in readESEL()
/openbmc/openbmc/meta-security/dynamic-layers/meta-perl/recipes-security/bastille/files/
H A DAccountPermission.pm677 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/bmcweb/features/ibm/
H A Dibm_management_console_rest.hpp388 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/phosphor-hwmon/
H A Dsensorset.cpp37 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 DTableToolbarExport.vue20 fileName: {
35 return `${this.fileName}.json`;
/openbmc/phosphor-logging/extensions/openpower-pels/tools/
H A Dpeltool.cpp64 uint64_t fileNameToTimestamp(const std::string& fileName) in fileNameToTimestamp() argument
66 std::string token = fileName.substr(0, fileName.find("_")); in fileNameToTimestamp()
160 uint32_t fileNameToPELId(const std::string& fileName) in fileNameToPELId() argument
165 num = std::stoul(fileName.substr(fileName.find("_") + 1), nullptr, 16); in fileNameToPELId()
310 auto fileName = (archive ? pelLogDir() + "/archive" : pelLogDir()) + name; in genPELJSON() local
313 std::vector<uint8_t> data = getFileData(fileName); in genPELJSON()
317 entry("FILENAME=%s", fileName.c_str())); in genPELJSON()
444 entry("FILENAME=%s", fileName.c_str()), in genPELJSON()
832 std::string fileName; in main() local
850 app.add_option("--file", fileName, "Display a PEL using its Raw PEL file"); in main()
[all …]
/openbmc/bmcweb/redfish-core/src/
H A Dfilesystem_log_watcher.cpp140 std::string fileName(&readBuffer[index + iEventSize]); in onINotify() local
141 if (fileName != "redfish") in onINotify()
148 fileName); in onINotify()
/openbmc/openbmc/poky/meta/recipes-core/images/build-appliance-image/
H A DYocto_Build_Appliance.vmx10 sata0:0.fileName = "Yocto_Build_Appliance.vmdk"
18 sound.fileName = "-1"
/openbmc/openpower-occ-control/
H A Dpowercap.cpp317 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 Dimg2srec.c227 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()

123