diff -r 690cd13b97a9 -r f76e0f94b7ab imgtools/romtools/rofsbuild/r_smrimage.cpp --- a/imgtools/romtools/rofsbuild/r_smrimage.cpp Wed Jun 30 16:14:56 2010 +0800 +++ b/imgtools/romtools/rofsbuild/r_smrimage.cpp Thu Jul 01 14:58:06 2010 +0800 @@ -70,31 +70,25 @@ Val(iSmrRomHeader.iImageVersion,aValues.at(0).c_str()); return ETrue; } -TBool CSmrImage::SetHcrData(const StringVector& aValues) +TBool CSmrImage::SetSmrData(const StringVector& aValues) { if(aValues.size() == 0) { - Print(EError, "keyword hcrdata has not been set!"); + Print(EError, "keyword smrdata has not been set!"); return EFalse; } if(aValues.size() > 1) { - Print(EError, "Keyword hcrdata has been set more than one time!"); + Print(EError, "Keyword smrdata has been set more than one time!"); return EFalse; } - iHcrData = aValues.at(0); + iSmrData = aValues.at(0); - ifstream is(iHcrData.c_str(), ios_base::binary ); + ifstream is(iSmrData.c_str(), ios_base::binary ); if(!is) { - Print(EError, "HCR data file: %s dose not exist!", iHcrData.c_str()); - return EFalse; - } - TUint32 magicWord = 0; - is.read(reinterpret_cast(&magicWord),sizeof(TUint32)); - if(0x66524348 != magicWord){ - Print(EError, "HCR data file: %s is an invalid HCR data file!", iHcrData.c_str()); + Print(EError, "SMR data file: %s dose not exist!", iSmrData.c_str()); return EFalse; } is.close(); @@ -140,7 +134,7 @@ return result; if(! SetFormatVersion(iObeyFile->getValues("formatversion"))) return result; - if(! SetHcrData(iObeyFile->getValues("hcrdata"))) + if(! SetSmrData(iObeyFile->getValues("smrdata"))) return result; if(! SetPayloadUID(iObeyFile->getValues("payloaduid"))) return result; @@ -153,10 +147,10 @@ { TInt imageSize = 0; ifstream is; - is.open(iHcrData.c_str(), ios_base::binary); + is.open(iSmrData.c_str(), ios_base::binary); if(!is) { - Print(EError, "Open HCR data file: %s error!\n", iHcrData.c_str()); + Print(EError, "Open SMR data file: %s error!\n", iSmrData.c_str()); return KErrGeneral; } is.seekg(0, ios_base::end);