int CMTDInfo::findMTDNumberFromName(const char* name)
{
	for (int i = 0; i < getMTDCount(); i++) {
		if ((std::string)name == getMTDName(i))
			return i;
	}
	return -1;
}
Exemplo n.º 2
0
int CMTDInfo::findMTDNumberFromDescription(const std::string & description)
{
	for(int x=0;x<getMTDCount();x++)
	{
		if(description == getMTDName(x))
		{
			return x;
		}
	}
	return -1;
}
Exemplo n.º 3
0
std::string CMTDInfo::findMTDsystem(const std::string & filename)
{
	for(int i = 0; i < getMTDCount(); i++) 
	{
		if(getMTDName(i) == filename) 
		{
			return getMTDFileName(i);
		}
	}
	
	return "";
}
Exemplo n.º 4
0
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 "";
}
Exemplo n.º 6
0
string CMTDInfo::getMTDName( string filename )
{
	return getMTDName( findMTDNumber(filename) );
}
Exemplo n.º 7
0
std::string CMTDInfo::getMTDName(const std::string & filename)
{
	return getMTDName( findMTDNumber(filename) );
}