tool/CommandSoeWrite.cpp
changeset 1870 0cee1fb7f0fd
parent 1869 14f634f5b613
child 1872 23d4e121faaf
--- a/tool/CommandSoeWrite.cpp	Thu Mar 11 15:03:52 2010 +0100
+++ b/tool/CommandSoeWrite.cpp	Thu Mar 11 15:17:25 2010 +0100
@@ -80,7 +80,6 @@
 
 void CommandSoeWrite::execute(const StringVector &args)
 {
-	MasterIndexList masterIndices;
     stringstream strIdn, err;
     const DataType *dataType = NULL;
     ec_ioctl_slave_soe_write_t ioctl;
@@ -99,12 +98,7 @@
         throwInvalidUsageException(err);
     }
 
-	masterIndices = getMasterIndices();
-    if (masterIndices.size() != 1) {
-        err << getName() << " requires to select a single master!";
-        throwInvalidUsageException(err);
-    }
-    MasterDevice m(masterIndices.front());
+    MasterDevice m(getSingleMasterIndex());
     m.open(MasterDevice::ReadWrite);
     slaves = selectedSlaves(m);
     if (slaves.size() != 1) {