Home
last modified time | relevance | path

Searched refs:filePath (Results 1 – 25 of 90) sorted by relevance

1234

/openbmc/pldm/oem/ibm/libpldmresponder/
H A Dfile_io_type_cert.cpp58 std::string filePath = certFilePath; in readIntoMemory() local
59 filePath += "CSR_" + std::to_string(fileHandle); in readIntoMemory()
64 auto rc = transferFileData(filePath.c_str(), true, offset, length, address); in readIntoMemory()
65 fs::remove(filePath); in readIntoMemory()
79 std::string filePath = certFilePath; in read() local
80 filePath += "CSR_" + std::to_string(fileHandle); in read()
85 auto rc = readFile(filePath.c_str(), offset, length, response); in read()
86 fs::remove(filePath); in read()
137 std::string filePath = certFilePath; in write() local
138 filePath += "ClientCert_" + std::to_string(fileHandle); in write()
[all …]
H A Dfile_io_by_type.cpp187 int FileHandler::readFile(const std::string& filePath, uint32_t offset, in readFile() argument
190 if (!fs::exists(filePath)) in readFile()
193 filePath, "FILE_HANDLE", fileHandle); in readFile()
197 size_t fileSize = fs::file_size(filePath); in readFile()
215 std::ifstream stream(filePath, std::ios::in | std::ios::binary); in readFile()
224 "PATH", filePath, "OFFSET", offset, "LENGTH", length); in readFile()
/openbmc/phosphor-certificate-manager/
H A Dcertificate.cpp141 char* filePath = tempnam(directoryPath.c_str(), nullptr); in generateUniqueFilePath() local
142 if (filePath == nullptr) in generateUniqueFilePath()
149 std::string filePathStr(filePath); in generateUniqueFilePath()
150 free(filePath); in generateUniqueFilePath()
226 auto installHelper = [this](const auto& filePath) { in Certificate() argument
227 if (!compareKeys(filePath)) in Certificate()
237 auto appendPrivateKey = [this](const std::string& filePath) { in Certificate() argument
238 checkAndAppendPrivateKey(filePath); in Certificate()
283 void Certificate::replace(const std::string filePath) in replace() argument
285 manager.replaceCertificate(this, filePath); in replace()
[all …]
H A Dcerts_manager.cpp252 std::string Manager::install(const std::string filePath) in install() argument
265 if (isCertificateUnique(filePath)) in install()
269 bus, certObjectPath, certType, certInstallPath, filePath, in install()
283 const std::string filePath) in installAll() argument
299 fs::path sourceFile(filePath); in installAll()
302 lg2::error("File is Missing, FILE:{FILE}", "FILE", filePath); in installAll()
369 std::string filePath) in replaceAll() argument
374 return installAll(std::move(filePath)); in replaceAll()
422 const std::string& filePath) in replaceCertificate() argument
424 if (isCertificateUnique(filePath, certificate)) in replaceCertificate()
[all …]
H A Dx509_utils.cpp91 X509Ptr loadCert(const std::string& filePath) in loadCert() argument
99 "FILE", filePath, "ERRCODE", ERR_get_error()); in loadCert()
103 BIOMemPtr bioCert(BIO_new_file(filePath.c_str(), "rb"), ::BIO_free); in loadCert()
107 "FILE", filePath); in loadCert()
115 "FILE", filePath); in loadCert()
H A Dcertificate.hpp133 void install(const std::string& filePath, bool restore);
148 void replace(const std::string filePath) override;
236 void checkAndAppendPrivateKey(const std::string& filePath);
245 bool compareKeys(const std::string& filePath);
H A Dcerts_manager.hpp79 std::string install(const std::string filePath) override;
100 std::string filePath) override;
114 const std::string& filePath);
269 const std::string& filePath,
/openbmc/phosphor-ipmi-flash/tools/test/
H A Dtools_bt_unittest.cpp42 const std::string filePath = "/asdf"; member in host_tool::__anon753fe9300111::BtHandlerTest
54 EXPECT_CALL(sysMock, open(Eq(filePath), _)).WillOnce(Return(fd)); in TEST_F()
55 EXPECT_CALL(sysMock, getSize(Eq(filePath))).WillOnce(Return(fakeFileSize)); in TEST_F()
73 EXPECT_TRUE(handler->sendContents(filePath, session)); in TEST_F()
81 EXPECT_CALL(sysMock, open(Eq(filePath), _)).WillOnce(Return(-1)); in TEST_F()
83 EXPECT_FALSE(handler->sendContents(filePath, session)); in TEST_F()
96 EXPECT_CALL(sysMock, open(Eq(filePath), _)).WillOnce(Return(fd)); in TEST_F()
97 EXPECT_CALL(sysMock, getSize(Eq(filePath))).WillOnce(Return(fakeFileSize)); in TEST_F()
113 EXPECT_FALSE(handler->sendContents(filePath, session)); in TEST_F()
H A Dtools_net_unittest.cpp55 EXPECT_CALL(sysMock, open(StrEq(filePath.c_str()), _)) in expectOpenFile()
58 EXPECT_CALL(sysMock, getSize(StrEq(filePath.c_str()))) in expectOpenFile()
97 const std::string filePath = "/asdf"s; member in host_tool::__anon925496610111::NetHandleTest
108 EXPECT_CALL(sysMock, open(StrEq(filePath.c_str()), _)) in TEST_F()
111 EXPECT_FALSE(handler.sendContents(filePath, session)); in TEST_F()
126 EXPECT_FALSE(handler.sendContents(filePath, session)); in TEST_F()
142 EXPECT_FALSE(handler.sendContents(filePath, session)); in TEST_F()
154 EXPECT_FALSE(handler.sendContents(filePath, session)); in TEST_F()
183 EXPECT_TRUE(handler.sendContents(filePath, session)); in TEST_F()
217 EXPECT_TRUE(handler.sendContents(filePath, session)); in TEST_F()
[all …]
H A Dtools_lpc_unittest.cpp38 std::string filePath = "/asdf"; in TEST() local
53 EXPECT_CALL(sysMock, open(StrEq(filePath.c_str()), _)) in TEST()
55 EXPECT_CALL(sysMock, getSize(StrEq(filePath.c_str()))) in TEST()
75 EXPECT_TRUE(handler.sendContents(filePath, session)); in TEST()
/openbmc/phosphor-psu-code-mgmt/test/
H A Dtest_activation.cpp81 std::string filePath = "/tmp/images/abcdefgh"; member in TestActivation
91 filePath, &mockedAssociationInterface, &mockedActivationListener); in TEST_F()
99 filePath, &mockedAssociationInterface, &mockedActivationListener); in TEST_F()
108 filePath = "/tmp/images/12345678"; in TEST_F()
112 filePath, &mockedAssociationInterface, &mockedActivationListener); in TEST_F()
122 filePath, &mockedAssociationInterface, &mockedActivationListener); in TEST_F()
143 filePath, &mockedAssociationInterface, &mockedActivationListener); in TEST_F()
172 filePath, &mockedAssociationInterface, &mockedActivationListener); in TEST_F()
224 filePath, &mockedAssociationInterface, &mockedActivationListener); in TEST_F()
256 filePath, &mockedAssociationInterface, &mockedActivationListener); in TEST_F()
[all …]
/openbmc/phosphor-debug-collector/
H A Dbmc_dump_entry.hpp88 const std::filesystem::path& filePath) in update() argument
94 file = filePath; in update()
119 const std::filesystem::path& filePath, phosphor::dump::Manager& parent) in deserializeEntry() argument
124 new Entry(bus, objPath, id, filePath, parent)); in deserializeEntry()
125 entry->updateFromFile(filePath); in deserializeEntry()
126 entry->deserialize(filePath.parent_path()); in deserializeEntry()
134 "PATH", filePath, "ERROR", e.what()); in deserializeEntry()
H A Dramoops_manager_main.cpp10 std::filesystem::path filePath(SYSTEMD_PSTORE_PATH); in main() local
11 if (!std::filesystem::exists(filePath)) in main()
14 "FILE_PATH", filePath); in main()
H A Ddump_manager_bmc.hpp54 const std::string& baseEntryPath, const char* filePath) : in Manager() argument
60 filePath, in Manager()
63 dumpDir(filePath) in Manager()
/openbmc/phosphor-psu-code-mgmt/src/
H A Dversion.cpp28 const std::string& filePath, const std::vector<std::string>& keys) in getValues() argument
30 if (filePath.empty()) in getValues()
34 Argument::ARGUMENT_VALUE(filePath.c_str())); in getValues()
37 std::ifstream efile(filePath); in getValues()
62 std::string Version::getValue(const std::string& filePath, in getValue() argument
66 auto values = Version::getValues(filePath, {key}); in getValue()
/openbmc/telemetry/src/
H A Dpersistent_json_storage.cpp33 void PersistentJsonStorage::store(const FilePath& filePath, in store() argument
38 const auto path = join(directory, filePath); in store()
66 remove(filePath); in store()
71 bool PersistentJsonStorage::remove(const FilePath& filePath) in remove() argument
73 const auto path = join(directory, filePath); in remove()
99 const FilePath& filePath) const in load()
101 const auto path = join(directory, filePath); in load()
/openbmc/phosphor-user-manager/phosphor-ldap-config/
H A Dldap_mapper_entry.cpp16 const char* filePath, in LDAPMapperEntry() argument
21 persistPath(filePath) in LDAPMapperEntry()
29 const char* filePath, Config& parent) : in LDAPMapperEntry() argument
32 persistPath(filePath) in LDAPMapperEntry()
/openbmc/phosphor-logging/phosphor-rsyslog-config/
H A Dserver-conf.hpp43 const char* filePath) : in Server() argument
45 configFilePath(filePath), in Server()
101 TransportProtocol protocol, const char* filePath);
112 void restore(const char* filePath);
/openbmc/openpower-pnor-code-mgmt/
H A Ditem_updater.cpp35 std::string filePath; in createActivation() local
69 filePath = std::get<std::string>(property.second); in createActivation()
74 if ((filePath.empty()) || (purpose == VersionPurpose::Unknown)) in createActivation()
95 if (validateImage(filePath)) in createActivation()
104 fs::path manifestPath(filePath); in createActivation()
118 createVersionObject(path, versionId, version, purpose, filePath); in createActivation()
H A Dversion.cpp56 const std::string& filePath, std::map<std::string, std::string> keys) in getValue() argument
58 if (filePath.empty()) in getValue()
62 Argument::ARGUMENT_VALUE(filePath.c_str())); in getValue()
72 efile.open(filePath); in getValue()
/openbmc/pldm/libpldmresponder/
H A Dbios_table.cpp19 BIOSTable::BIOSTable(const char* filePath) : filePath(filePath) {} in BIOSTable() argument
26 empty = fs::is_empty(filePath); in isEmpty()
37 std::ofstream stream(filePath.string(), std::ios::out | std::ios::binary); in store()
44 auto fileSize = fs::file_size(filePath); in load()
46 std::ifstream stream(filePath.string(), std::ios::in | std::ios::binary); in load()
/openbmc/bios-bmc-smm-error-logger/src/rde/
H A Dnotifier_dbus_handler.cpp15 void CperFileNotifierHandler::createEntry(const std::string& filePath) in createEntry() argument
18 std::make_unique<CperFileNotifier>(objServer, filePath, nextEntry); in createEntry()
/openbmc/openpower-hw-diags/util/
H A Dpdbg.cpp241 fs::path filePath; in getTargetAcrossBus() local
252 filePath = in getTargetAcrossBus()
259 filePath = in getTargetAcrossBus()
265 filePath = in getTargetAcrossBus()
271 filePath = in getTargetAcrossBus()
280 std::ifstream file{filePath}; in getTargetAcrossBus()
293 trace::err("Failed to parse file: %s", filePath.string().c_str()); in getTargetAcrossBus()
/openbmc/openpower-pnor-code-mgmt/test/
H A Dtest_functions.cpp301 auto filePath = targetPath / "file"; in TEST() local
302 std::ofstream link{linkPath}, file{filePath}; in TEST()
366 auto filePath = workdir / "foo.foo"; in TEST() local
367 std::ofstream file{filePath}; in TEST()
374 EXPECT_EQ(callbackPath, filePath.filename()); in TEST()
391 auto filePath = workdir / "foo.foo"; in TEST() local
392 std::ofstream file{filePath}; in TEST()
436 auto filePath = workdir / "foo.foo"; in TEST() local
437 std::ofstream file{filePath}; in TEST()
/openbmc/openpower-hw-diags/attn/
H A Dattn_dbus.cpp59 auto filePath = pelFile.getPath(); // path to ffdc file in createPelRaw() local
64 trace::err("%s only %u of %u bytes written", filePath.c_str(), numBytes, in createPelRaw()
72 additional.emplace("RAWPEL", filePath.string()); in createPelRaw()

1234