From 9908df895ee3ffe595abf952f15deca467c9ab97 Mon Sep 17 00:00:00 2001 From: Eddie Cai Date: Wed, 15 Mar 2017 10:12:30 +0800 Subject: [PATCH] main: fix write_lba fail the input file of write lba command may not 128 aligned. that may cause write lba command fail. remove the judge to fix this issue. Signed-off-by: Eddie Cai --- main.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/main.cpp b/main.cpp index c90586b..6da93ec 100644 --- a/main.cpp +++ b/main.cpp @@ -682,10 +682,6 @@ bool write_lba(STRUCT_RKDEVICE_DESC &dev, UINT uiBegin, char *szFile) while(iTotalWrite < iFileSize) { memset(pBuf, 0, nSectorSize * DEFAULT_RW_LBA); iWrite = iRead= fread(pBuf, 1, nSectorSize * DEFAULT_RW_LBA, file); - if ((int)iRead != nSectorSize * DEFAULT_RW_LBA) { - printf("Write LBA failed,err=%d,read=%d,total=%d!\r\n", errno, iRead, nSectorSize * DEFAULT_RW_LBA); - goto Exit_WriteLBA; - } uiLen = ((iWrite % 512) == 0) ? (iWrite / 512) : (iWrite / 512 + 1); iRet = pComm->RKU_WriteLBA( uiBegin, uiLen, pBuf); if(ERR_SUCCESS == iRet) {