From ad48ffd99c97c973abd065b498ccc6578b8410df Mon Sep 17 00:00:00 2001 From: "[CST] Focus" Date: Tue, 18 Jun 2013 16:24:50 +0400 Subject: [PATCH] gui/update_ext.cpp: return error, if sysfs not found; hack mtd size for apollo --- src/gui/update_ext.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/gui/update_ext.cpp b/src/gui/update_ext.cpp index 320107e46..0346eeb3d 100644 --- a/src/gui/update_ext.cpp +++ b/src/gui/update_ext.cpp @@ -202,7 +202,14 @@ bool CExtUpdate::applySettings() CMTDInfo * mtdInfo = CMTDInfo::getInstance(); std::string mtdFilename = mtdInfo->findMTDsystem(); // /dev/mtdX + if (mtdFilename.empty()) + return ErrorReset(0, "error system mtd not found"); + +#ifdef BOXMODEL_APOLLO + int mtdSize = 65536*1024; // FIXME hack, mtd size more than free RAM +#else int mtdSize = mtdInfo->getMTDSize(mtdFilename); +#endif int mtdEraseSize = mtdInfo->getMTDEraseSize(mtdFilename); mtdNumber = mtdInfo->findMTDNumber(mtdFilename);