summaryrefslogtreecommitdiffstats
path: root/src/import
diff options
context:
space:
mode:
authorPrachi Gupta <pragupta@us.ibm.com>2017-06-16 17:03:56 -0500
committerSachin Gupta <sgupta2m@in.ibm.com>2017-06-19 18:55:28 -0400
commita36220b33148ceb1cb8fe78b1082e2fb3c485858 (patch)
tree75a9b76aba05772713983647a8206f033b689012 /src/import
parentd08954e955f463be0116f6ebd86bca3898f8707d (diff)
downloadtalos-sbe-a36220b33148ceb1cb8fe78b1082e2fb3c485858.tar.gz
talos-sbe-a36220b33148ceb1cb8fe78b1082e2fb3c485858.zip
p9_ipl_build.C: remove debug file as it is not needed
Change-Id: I32ce10faa07bebd4cf449a1fbf920eb4a99b14fd Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/42010 Reviewed-by: Sachin Gupta <sgupta2m@in.ibm.com> Reviewed-by: Claus M. Olsen <cmolsen@us.ibm.com> Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: PPE CI <ppe-ci+hostboot@us.ibm.com> Reviewed-by: Matt K. Light <mklight@us.ibm.com> Reviewed-by: Prachi Gupta <pragupta@us.ibm.com> Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/42014 Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Diffstat (limited to 'src/import')
-rw-r--r--src/import/tools/imageProcs/p9_ipl_build.C57
1 files changed, 5 insertions, 52 deletions
diff --git a/src/import/tools/imageProcs/p9_ipl_build.C b/src/import/tools/imageProcs/p9_ipl_build.C
index 4f4687e9..005a091f 100644
--- a/src/import/tools/imageProcs/p9_ipl_build.C
+++ b/src/import/tools/imageProcs/p9_ipl_build.C
@@ -55,30 +55,6 @@
using namespace P9_TOR;
-// prefix of our debug file name
-const char* CHIP_TYPE = "p9_";
-
-///
-/// @brief Create a filename containing the DD level and chip type
-///
-/// @param[in] i_fn SBE image file name
-/// @param[in] i_ddLevel - DD level of ring
-///
-/// @retval std::string - holding the newly created file name.
-///
-std::string getDDSpecificFileName( const char* i_fn,
- uint32_t i_ddLevel )
-{
- // create our dd specific file name
- std::stringstream ss;
- std::string fn = i_fn;
- size_t found = fn.find_last_of("/");
-
- ss << CHIP_TYPE << std::hex << i_ddLevel << "." << fn.substr(found + 1);
- return ss.str();
-}
-
-
///
/// @brief retrieve a block of DD level rings from the unsigned hw image
///
@@ -248,10 +224,7 @@ int ipl_build( char* i_fnSbeImage,
int rc = 0;
- std::string ddSpecificFileName = getDDSpecificFileName(i_fnSbeImage, i_ddLevel);
-
std::ifstream sbeImageFile;
- std::ofstream ddSpecificImage;
sbeImageFile.open(i_fnSbeImage, std::ios::binary | std::ios::in | std::ios::out);
@@ -334,30 +307,11 @@ int ipl_build( char* i_fnSbeImage,
if(rc == IMGBUILD_SUCCESS)
{
- // looks like it worked, create a debug file and write the
- // customized image to it
- ddSpecificImage.open(ddSpecificFileName.c_str(), std::ios::binary | std::ios::out);
-
- if(!ddSpecificImage)
- {
- MY_ERR("failed to open %s for writing\n", ddSpecificFileName.c_str());
- rc = IMGBUILD_ERR_FILE_ACCESS;
- }
- else
- {
- std::filebuf* outbuf = ddSpecificImage.rdbuf();
-
- outbuf->sputn(sbeImage, sbeImageSize);
-
- MY_INF("DD specific file created as %s\n", ddSpecificFileName.c_str());
-
- // rewind to the beginning of the original file and write this
- // into it.
- pbuf->pubseekpos(0, sbeImageFile.in);
-
- pbuf->sputn(sbeImage, sbeImageSize);
-
- }
+ MY_INF("SUCCESS! DD specific SBE image created successfully!\n");
+ // rewind to the beginning of the original file and write this
+ // into it.
+ pbuf->pubseekpos(0, sbeImageFile.in);
+ pbuf->sputn(sbeImage, sbeImageSize);
}
else
{
@@ -370,7 +324,6 @@ int ipl_build( char* i_fnSbeImage,
free(sbeImage);
free(l_ringBlock);
- ddSpecificImage.close();
sbeImageFile.close();
}
OpenPOWER on IntegriCloud