mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-30 08:51:04 +02:00
CMTDInfo: Add function findMTDNumberFromName()
Origin commit data
------------------
Branch: ni/coolstream
Commit: 859ef920cc
Author: Michael Liebmann <tuxcode.bbg@gmail.com>
Date: 2013-09-28 (Sat, 28 Sep 2013)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -636,6 +636,15 @@ int CMTDInfo::findMTDNumber(const std::string & filename)
|
||||
return -1;
|
||||
}
|
||||
|
||||
int CMTDInfo::findMTDNumberFromName(const char* name)
|
||||
{
|
||||
for (int i = 0; i < getMTDCount(); i++) {
|
||||
if ((std::string)name == getMTDName(i))
|
||||
return i;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
std::string CMTDInfo::getMTDName(const std::string & filename)
|
||||
{
|
||||
return getMTDName( findMTDNumber(filename) );
|
||||
|
@@ -131,6 +131,7 @@ class CMTDInfo
|
||||
int getMTDEraseSize( const std::string & filename );
|
||||
|
||||
int findMTDNumber(const std::string & filename);
|
||||
int findMTDNumberFromName(const char* name);
|
||||
std::string findMTDsystem();
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user