tool/CommandEoe.cpp
changeset 1869 14f634f5b613
parent 1827 489be2180f71
child 1968 4f682084c643
equal deleted inserted replaced
1868:489ea0becd74 1869:14f634f5b613
    61 
    61 
    62 /****************************************************************************/
    62 /****************************************************************************/
    63 
    63 
    64 void CommandEoe::execute(const StringVector &args)
    64 void CommandEoe::execute(const StringVector &args)
    65 {
    65 {
       
    66 	MasterIndexList masterIndices;
    66     ec_ioctl_master_t master;
    67     ec_ioctl_master_t master;
    67     unsigned int i;
    68     unsigned int i;
    68     ec_ioctl_eoe_handler_t eoe;
    69     ec_ioctl_eoe_handler_t eoe;
    69     bool doIndent;
    70     bool doIndent;
    70     string indent;
    71     string indent;
    73         stringstream err;
    74         stringstream err;
    74         err << "'" << getName() << "' takes no arguments!";
    75         err << "'" << getName() << "' takes no arguments!";
    75         throwInvalidUsageException(err);
    76         throwInvalidUsageException(err);
    76     }
    77     }
    77 
    78 
    78     doIndent = getMasterIndices().size();
    79 	masterIndices = getMasterIndices();
       
    80     doIndent = masterIndices.size();
    79     indent = doIndent ? "  " : "";
    81     indent = doIndent ? "  " : "";
    80     MasterIndexList::const_iterator mi;
    82     MasterIndexList::const_iterator mi;
    81     for (mi = getMasterIndices().begin();
    83     for (mi = masterIndices.begin();
    82             mi != getMasterIndices().end(); mi++) {
    84             mi != masterIndices.end(); mi++) {
    83         MasterDevice m(*mi);
    85         MasterDevice m(*mi);
    84         m.open(MasterDevice::Read);
    86         m.open(MasterDevice::Read);
    85         m.getMaster(&master);
    87         m.getMaster(&master);
    86 
    88 
    87         if (master.eoe_handler_count) {
    89         if (master.eoe_handler_count) {