diff -r 14f634f5b613 -r 0cee1fb7f0fd tool/CommandFoeWrite.cpp --- a/tool/CommandFoeWrite.cpp Thu Mar 11 15:03:52 2010 +0100 +++ b/tool/CommandFoeWrite.cpp Thu Mar 11 15:17:25 2010 +0100 @@ -82,7 +82,6 @@ void CommandFoeWrite::execute(const StringVector &args) { - MasterIndexList masterIndices; stringstream err; ec_ioctl_slave_foe_t data; ifstream file; @@ -94,13 +93,6 @@ throwInvalidUsageException(err); } - masterIndices = getMasterIndices(); - if (masterIndices.size() != 1) { - err << getName() << " requires to select a single master!"; - throwInvalidUsageException(err); - } - MasterDevice m(masterIndices.front()); - if (args[0] == "-") { loadFoeData(&data, cin); if (getOutputFile().empty()) { @@ -128,6 +120,7 @@ } } + MasterDevice m(getSingleMasterIndex()); try { m.open(MasterDevice::ReadWrite); } catch (MasterDeviceException &e) {