Search mtd device to update by name

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@581 e54a6e83-5905-42d5-8d5c-058d10e6a962


Origin commit data
------------------
Branch: ni/coolstream
Commit: d133701c83
Author: [CST] Focus <focus.cst@gmail.com>
Date: 2010-05-12 (Wed, 12 May 2010)



------------------
This commit was generated by Migit
This commit is contained in:
[CST] Focus
2010-05-12 12:10:12 +00:00
parent 87f26c3a60
commit 3956bc3806
5 changed files with 64 additions and 4 deletions

View File

@@ -539,3 +539,16 @@ int CMTDInfo::getMTDEraseSize( const std::string & filename )
{
return getMTDEraseSize( findMTDNumber(filename) );
}
std::string CMTDInfo::findMTDsystem()
{
std::string sysfs = "systemFS";
for(int i = 0; i < getMTDCount(); i++) {
if(getMTDName(i) == sysfs) {
printf("systemFS: %d dev %s\n", i, getMTDFileName(i).c_str());
return getMTDFileName(i);
}
}
return "";
}