tool/CommandSiiRead.cpp
changeset 1870 0cee1fb7f0fd
parent 1869 14f634f5b613
child 1968 4f682084c643
--- a/tool/CommandSiiRead.cpp	Thu Mar 11 15:03:52 2010 +0100
+++ b/tool/CommandSiiRead.cpp	Thu Mar 11 15:17:25 2010 +0100
@@ -76,7 +76,6 @@
 
 void CommandSiiRead::execute(const StringVector &args)
 {
-	MasterIndexList masterIndices;
     SlaveList slaves;
     ec_ioctl_slave_t *slave;
     ec_ioctl_slave_sii_t data;
@@ -90,12 +89,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::Read);
     slaves = selectedSlaves(m);