mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-09-03 19:01:25 +02:00
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
This commit is contained in:
@@ -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 "";
|
||||
}
|
||||
|
@@ -124,7 +124,7 @@ class CMTDInfo
|
||||
int getMTDEraseSize( const std::string & filename );
|
||||
|
||||
int findMTDNumber(const std::string & filename);
|
||||
|
||||
std::string findMTDsystem();
|
||||
};
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user