Lines Matching defs:imgLen
336 bool UfsPtable::LoadPartitionInfoFromLun(const uint32_t lunIndex, const uint32_t imgLen)
338 if (imgLen == 0 || lunIndex < 0 || lunIndex > deviceLunNum_) {
339 LOG(ERROR) << "imgLen or lunIndex is invaild " << imgLen << " " << lunIndex;
344 uint8_t *buffer = new(std::nothrow) uint8_t[imgLen]();
349 if (!MemReadWithOffset(ufsNode, 0, buffer, imgLen)) {
350 LOG(ERROR) << "read " << imgLen << " bytes from ufsNode " << ufsNode << " failed!";
357 newLunPtnDataInfo.lunSize = imgLen;
358 newLunPtnDataInfo.writeDataLen = imgLen;
360 if (memcpy_s(newLunPtnDataInfo.data, TMP_DATA_SIZE, buffer, imgLen) != EOK) {
365 int32_t result = UfsReadGpt(buffer, imgLen, lunIndex, GetDeviceBlockSize());