Multi-master support for command-line tool. The --master option supports

ranges like '1-3,6,7-9'. The ioctl() interface version is checked.
This commit is contained in:
Florian Pose
2010-02-24 16:27:11 +01:00
parent edf5fdf61f
commit f41dadb84f
61 changed files with 916 additions and 298 deletions

View File

@@ -32,6 +32,7 @@
using namespace std;
#include "CommandDebug.h"
#include "MasterDevice.h"
/*****************************************************************************/
@@ -65,7 +66,7 @@ string CommandDebug::helpString() const
/****************************************************************************/
void CommandDebug::execute(MasterDevice &m, const StringVector &args)
void CommandDebug::execute(const StringVector &args)
{
stringstream str;
int debugLevel;
@@ -86,8 +87,13 @@ void CommandDebug::execute(MasterDevice &m, const StringVector &args)
throwInvalidUsageException(err);
}
m.open(MasterDevice::ReadWrite);
m.setDebug(debugLevel);
MasterIndexList::const_iterator mi;
for (mi = getMasterIndices().begin();
mi != getMasterIndices().end(); mi++) {
MasterDevice m(*mi);
m.open(MasterDevice::ReadWrite);
m.setDebug(debugLevel);
}
}
/*****************************************************************************/