tool/CommandDomains.cpp
branchredundancy
changeset 2369 2536d60dea6e
parent 1968 4f682084c643
child 2453 d461b1f07296
equal deleted inserted replaced
2368:dd84ef164869 2369:2536d60dea6e
   134     ec_ioctl_domain_data_t data;
   134     ec_ioctl_domain_data_t data;
   135     unsigned int i, j;
   135     unsigned int i, j;
   136     ec_ioctl_domain_fmmu_t fmmu;
   136     ec_ioctl_domain_fmmu_t fmmu;
   137     unsigned int dataOffset;
   137     unsigned int dataOffset;
   138     string indent(doIndent ? "  " : "");
   138     string indent(doIndent ? "  " : "");
       
   139     unsigned int wc_sum = 0, dev_idx;
       
   140 
       
   141     for (dev_idx = 0; dev_idx < EC_NUM_DEVICES; dev_idx++) {
       
   142         wc_sum += domain.working_counter[dev_idx];
       
   143     }
   139 
   144 
   140     cout << indent << "Domain" << dec << domain.index << ":"
   145     cout << indent << "Domain" << dec << domain.index << ":"
   141         << " LogBaseAddr 0x"
   146         << " LogBaseAddr 0x"
   142         << hex << setfill('0')
   147         << hex << setfill('0')
   143         << setw(8) << domain.logical_base_address
   148         << setw(8) << domain.logical_base_address
   144         << ", Size " << dec << setfill(' ')
   149         << ", Size " << dec << setfill(' ')
   145         << setw(3) << domain.data_size
   150         << setw(3) << domain.data_size
   146         << ", WorkingCounter "
   151         << ", WorkingCounter "
   147         << domain.working_counter << "/"
   152         << wc_sum << "/"
   148         << domain.expected_working_counter << endl;
   153         << domain.expected_working_counter;
       
   154     if (EC_NUM_DEVICES == 2) {
       
   155         cout << " (" << domain.working_counter[EC_DEVICE_MAIN]
       
   156             << "+" << domain.working_counter[EC_DEVICE_BACKUP]
       
   157             << ")";
       
   158     }
       
   159     cout << endl;
   149 
   160 
   150     if (!domain.data_size || getVerbosity() != Verbose)
   161     if (!domain.data_size || getVerbosity() != Verbose)
   151         return;
   162         return;
   152 
   163 
   153     processData = new unsigned char[domain.data_size];
   164     processData = new unsigned char[domain.data_size];