Exemplo n.º 1
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.º 3
0
int CMTDInfo::findMTDNumber( string filename )
{
	for(int x=0;x<getMTDCount();x++)
	{
		if(filename == getMTDFileName(x))
		{
			return x;
		}
	}
	return -1;
}
Exemplo n.º 4
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.º 5
0
string CMTDInfo::getMTDFileName( string filename )
{
	return getMTDFileName( findMTDNumber(filename) );
}