/* * Return true or false depending on whether or not the dimm belongs to the interleave set */ bool wbem::mem_config::MemoryConfigurationFactory::dimmIsInIlset(const NVM_UID uid, const struct interleave_set &ilset) { bool result = false; for (int i = 0; i < ilset.dimm_count; i++) { if (uid_cmp(uid, ilset.dimms[i])) { result = true; break; } } return result; }
/* * Return the index where the uid is found in the pool's dimms array. Return -1 if the uid * is not in the array. */ int wbem::mem_config::MemoryConfigurationFactory::getDimmIndexInPoolOrReturnNotFound (const NVM_UID uid, const struct pool *pool) { int result = framework::NOTFOUND; for (int i = 0; i < pool->dimm_count; i++) { if (uid_cmp(uid, pool->dimms[i])) { result = i; break; } } return result; }
bool wbem::logic::RuleRejectLockedDimms::isDimmLocked(const wbem::logic::Dimm& dimm) { LogEnterExit logging(__FUNCTION__, __FILE__, __LINE__); bool isLocked = false; NVM_UID dimmUid; uid_copy(dimm.uid.c_str(), dimmUid); for (std::vector<struct device_discovery>::const_iterator iter = m_manageableDevices.begin(); iter != m_manageableDevices.end(); iter++) { if (uid_cmp(iter->uid, dimmUid)) { isLocked = isSecurityStateLocked(iter->lock_state); break; } } return isLocked; }