Lines Matching +full:last +full:- +full:level

10 #include <phosphor-logging/lg2.hpp>
38 * Must always be called as last reference to fruFilePointer.
40 * @param[in] fruFilePointer - FRU file pointer to close
41 * @param[in] fruAreaVec - vector of FRU areas
42 * @return -1
56 return -1;
63 * @param[in] section - FRU section name
64 * @param[in] key - key for section
65 * @param[in] delimiter - delimiter for parsing custom fields
66 * @param[in] fruData - the FRU data to search for the section
93 auto last = first + (maxIndexValue - minIndexValue) + 1;
95 auto itr = std::find_if(first, last, [&key](const auto& e) {
99 if (itr != last)
101 fruValue = itr->second;
127 * @param[in] bus - sdbusplus handle to use for dbus call
128 * @param[in] intf - interface
129 * @param[in] path - the object path
160 return mapperResponse.begin()->first;
167 * @param[in] areaVector - vector of FRU areas
168 * @param[in] bus - handle to sdbus for calling methods, etc
169 * @return return non-zero of failure
182 fruid = fruArea->getFruID();
184 rc = parse_fru_area(fruArea->getType(),
185 static_cast<const void*>(fruArea->getData()),
186 fruArea->getLength(), fruData);
212 return -1;
220 return -1;
223 auto& instanceList = iter->second;
255 (extrasIter->second).find(interfaceList.first);
256 if ((extrasIter->second).end() != propsIter)
258 for (const auto& map : propsIter->second)
273 for (const auto& entry : extrasIter->second)
297 return -1;
309 * @param[in] data - data for running crc
310 * @param[in] len - the length over which to run the crc
323 return (-crc);
329 * @param[in] areaOffset - offset to lookup the area type
368 * @param[in] data - the data to verify
369 * @param[in] len - the length of the region to verify
370 * @param[in] validateCrc - whether to validate the CRC
371 * @return non-zero on failure
377 int rc = -1;
400 * @param[in] data - the data to verify
401 * @param[in] len - the length of the region to verify
402 * @param[in] validateCrc - whether to validate the CRC
403 * @return non-zero on failure
408 int rc = -1;
413 lg2::error("Invalid entry in byte-0, entry: {ENTRY}", "ENTRY", lg2::hex,
427 // CRC to be calculated on all except the last one that is CRC itself.
428 checksum = calculateCRC(data, len - 1);
429 if (checksum != data[len - 1])
448 if (!(fruArea->getLength()))
459 * @param[in] fruData - pointer to the FRU bytes
460 * @param[in] dataLen - the length of the FRU data
461 * @param[in] fruAreaVec - the FRU area vector to update
466 // Now walk the common header and see if the file size has at least the last
471 fruEntry < (sizeof(struct common_header) - 2); fruEntry++)
473 int rc = -1;
548 if (iter->getType() == getFruAreaType(fruEntry))
550 iter->setData(areaData.data(), areaLen);
569 * @param[in] fruData - the FRU data
570 * @param[in] dataLen - the length of the data
571 * @return non-zero on failure
575 int rc = -1;
604 int rc = -1;
611 fruEntry < (sizeof(struct common_header) - 2); fruEntry++)
619 fruArea->setPresent(present);
677 lg2::debug("fru id: {FRUID}", "FRUID", iter->getFruID());
678 lg2::debug("area name: {AREA}", "AREA", iter->getName());
679 lg2::debug("type: {TYPE}", "TYPE", iter->getType());
680 lg2::debug("length: {LEN}", "LEN", iter->getLength());