From a36220b33148ceb1cb8fe78b1082e2fb3c485858 Mon Sep 17 00:00:00 2001 From: Prachi Gupta Date: Fri, 16 Jun 2017 17:03:56 -0500 Subject: 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 Reviewed-by: Claus M. Olsen Tested-by: Jenkins Server Tested-by: PPE CI Reviewed-by: Matt K. Light Reviewed-by: Prachi Gupta Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/42014 Tested-by: FSP CI Jenkins --- src/import/tools/imageProcs/p9_ipl_build.C | 57 +++--------------------------- 1 file changed, 5 insertions(+), 52 deletions(-) (limited to 'src/import/tools') 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(); } -- cgit v1.2.1