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 ""; }
std::string CMTDInfo::findMTDsystem() { #ifdef BOXMODEL_APOLLO std::string sysfs = "root0"; #else std::string sysfs = "systemFS"; #endif 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 ""; }
int CMTDInfo::findMTDNumber( string filename ) { for(int x=0;x<getMTDCount();x++) { if(filename == getMTDFileName(x)) { return x; } } return -1; }
std::string CMTDInfo::findMTDsystem(const std::string & filename) { for(int i = 0; i < getMTDCount(); i++) { if(getMTDName(i) == filename) { return getMTDFileName(i); } } return ""; }
string CMTDInfo::getMTDFileName( string filename ) { return getMTDFileName( findMTDNumber(filename) ); }