diff options
-rwxr-xr-x | configure.ac | 6 | ||||
-rwxr-xr-x | generate-squashfs | 2 | ||||
-rw-r--r-- | test/utest.cpp | 6 | ||||
-rw-r--r-- | version_host_software_manager.cpp | 12 | ||||
-rwxr-xr-x | version_host_software_manager.hpp | 2 | ||||
-rw-r--r-- | version_host_software_manager_main.cpp | 2 |
6 files changed, 15 insertions, 15 deletions
diff --git a/configure.ac b/configure.ac index de7c5b798..9c0b40681 100755 --- a/configure.ac +++ b/configure.ac @@ -61,9 +61,9 @@ AC_DEFINE(VERSION_IFACE, "xyz.openbmc_project.Software.Version", AC_DEFINE(BUSNAME_UPDATER, "org.open_power.Software.Host.Updater", [The item updater DBus busname to own.]) -AC_ARG_VAR(TOC_FILE, [The path to the pnor toc file]) -AS_IF([test "x$TOC_FILE" == "x"], [TOC_FILE="/tmp/pnor/pnor.toc"]) -AC_DEFINE_UNQUOTED([TOC_FILE], ["$TOC_FILE"], [The path to the pnor toc file]) +AC_ARG_VAR(MANIFEST_FILE, [The path to the MANIFEST file]) +AS_IF([test "x$MANIFEST_FILE" == "x"], [MANIFEST_FILE="/tmp/pnor/MANIFEST"]) +AC_DEFINE_UNQUOTED([MANIFEST_FILE], ["$MANIFEST_FILE"], [The path to the MANIFEST file]) AC_DEFINE(MAPPER_BUSNAME, "xyz.openbmc_project.ObjectMapper", [The object mapper busname.]) diff --git a/generate-squashfs b/generate-squashfs index e85cc8752..11f0abc3a 100755 --- a/generate-squashfs +++ b/generate-squashfs @@ -104,7 +104,7 @@ mksquashfs ${tocfile} ${partitions[*]} ${scratch_dir}/pnor.xz.squashfs echo "Creating MANIFEST for the image" manifest_location="${scratch_dir}/MANIFEST" -echo -e "purpose: host\nversion: $version" >> $manifest_location +echo -e "purpose=host\nversion=$version" >> $manifest_location echo "Generating tarball to contain the SquashFS image and its MANIFEST" tar -cvf $outfile $manifest_location ${scratch_dir}/pnor.xz.squashfs diff --git a/test/utest.cpp b/test/utest.cpp index 4da45a5f4..4fd1e78ed 100644 --- a/test/utest.cpp +++ b/test/utest.cpp @@ -37,17 +37,17 @@ class VersionTest : public testing::Test /** @brief Make sure we correctly get the version from getVersion()*/ TEST_F(VersionTest, TestGetVersion) { - auto tocFilePath = _directory + "/" + "pnor.toc"; + auto manifestFilePath = _directory + "/" + "MANIFEST"; auto version = "test-version"; std::ofstream file; - file.open(tocFilePath, std::ofstream::out); + file.open(manifestFilePath, std::ofstream::out); ASSERT_TRUE(file.is_open()); file << "version=" << version << std::endl; file.close(); - EXPECT_EQ(Version::getVersion(tocFilePath), version); + EXPECT_EQ(Version::getVersion(manifestFilePath), version); } /** @brief Make sure we correctly get the Id from getId()*/ diff --git a/version_host_software_manager.cpp b/version_host_software_manager.cpp index 7719270bc..6b392d4b0 100644 --- a/version_host_software_manager.cpp +++ b/version_host_software_manager.cpp @@ -15,15 +15,15 @@ namespace manager using namespace phosphor::logging; -std::string Version::getVersion(const std::string& tocFilePath) +std::string Version::getVersion(const std::string& manifestFilePath) { constexpr auto versionKey = "version="; constexpr auto versionKeySize = strlen(versionKey); - if (tocFilePath.empty()) + if (manifestFilePath.empty()) { - log<level::ERR>("Error TocFilePath is empty"); - throw std::runtime_error("TocFilePath is empty"); + log<level::ERR>("Error MANIFESTFilePath is empty"); + throw std::runtime_error("MANIFESTFilePath is empty"); } std::string version{}; @@ -36,7 +36,7 @@ std::string Version::getVersion(const std::string& tocFilePath) // Too many GCC bugs (53984, 66145) to do this the right way... try { - efile.open(tocFilePath); + efile.open(manifestFilePath); while (getline(efile, line)) { if (line.compare(0, versionKeySize, versionKey) == 0) @@ -49,7 +49,7 @@ std::string Version::getVersion(const std::string& tocFilePath) } catch (const std::exception& e) { - log<level::ERR>("Error in reading Host pnor.toc file"); + log<level::ERR>("Error in reading Host MANIFEST file"); } return version; diff --git a/version_host_software_manager.hpp b/version_host_software_manager.hpp index e9b62d89d..74db7beed 100755 --- a/version_host_software_manager.hpp +++ b/version_host_software_manager.hpp @@ -45,7 +45,7 @@ class Version : public VersionInherit * * @return The version identifier. **/ - static std::string getVersion(const std::string& tocFilePath); + static std::string getVersion(const std::string& manifestFilePath); /** * @brief Get the Host Version id. diff --git a/version_host_software_manager_main.cpp b/version_host_software_manager_main.cpp index 0b5d973bf..9db6b0223 100644 --- a/version_host_software_manager_main.cpp +++ b/version_host_software_manager_main.cpp @@ -11,7 +11,7 @@ int main(int argc, char* argv[]) sdbusplus::server::manager::manager objManager(bus, SOFTWARE_OBJPATH); - auto version = openpower::software::manager::Version::getVersion(TOC_FILE); + auto version = openpower::software::manager::Version::getVersion(MANIFEST_FILE); auto id = openpower::software::manager::Version::getId(version); openpower::software::manager::Version manager(bus, |