Lines Matching defs:length

127 	// Save the partition offset and length
456 IOByteCount length)
460 if ((buffer == 0) || (length == 0) ||
461 (offset + length > kIODTNVRAMXPRAMSize))
464 bcopy(_nvramImage + _xpramPartitionOffset + offset, buffer, length);
470 IOByteCount length)
474 if ((buffer == 0) || (length == 0) ||
475 (offset + length > kIODTNVRAMXPRAMSize))
478 bcopy(buffer, _nvramImage + _xpramPartitionOffset + offset, length);
520 IOByteCount length)
536 if ((buffer == 0) || (length == 0) ||
537 (offset + length > partitionLength))
540 bcopy(_nvramImage + partitionOffset + offset, buffer, length);
547 IOByteCount length)
563 if ((buffer == 0) || (length == 0) ||
564 (offset + length > partitionLength))
567 bcopy(buffer, _nvramImage + partitionOffset + offset, length);
574 IOByteCount IODTNVRAM::savePanicInfo(UInt8 *buffer, IOByteCount length)
576 if ((_piImage == 0) || (length <= 0)) return 0;
578 if (length > (_piPartitionSize - 4))
579 length = _piPartitionSize - 4;
582 bcopy(buffer, _piImage + 4, length);
584 // Save the Panic Info length.
585 *(UInt32 *)_piImage = length;
597 return length;
627 UInt16 length;
652 // Find the length of the name.
699 // Clear the length from _piImage and mark dirty.
729 propDataLength = owHeader->owStrings[propOffset].length;
764 UInt32 cnt, length, maxLength;
800 length = maxLength;
801 ok = convertObjectToProp(tmpBuffer, &length, tmpSymbol, tmpObject);
803 tmpBuffer += length;
804 maxLength -= length;
859 owHeader->owStrings[tmpOffset].length = tmpDataLength;
1077 bool IODTNVRAM::convertObjectToProp(UInt8 *buffer, UInt32 *length,
1121 if ((propNameLength + propDataLength + 2) > *length) return false;
1124 buffer += snprintf((char *)buffer, *length, "%s=", propName);
1129 strlcpy((char *)buffer, "true", *length - propNameLength);
1131 strlcpy((char *)buffer, "false", *length - propNameLength);
1138 strlcpy((char *)buffer, "-1", *length - propNameLength);
1140 snprintf((char *)buffer, *length - propNameLength, "%d", (uint32_t)tmpValue);
1142 snprintf((char *)buffer, *length - propNameLength, "0x%x", (uint32_t)tmpValue);
1147 strlcpy((char *)buffer, tmpString->getCStringNoCopy(), *length - propNameLength);
1158 *length = propNameLength + propDataLength + 2;
1315 IOByteCount length;
1329 length = prop->nameLength;
1330 if (length > kMaxNVNameLength) length = kMaxNVNameLength;
1331 strncpy(nameBuf, (const char *)prop->name, length);
1332 nameBuf[length] = 0;
1335 length = prop->dataLength;
1336 if (length > kMaxNVDataLength) length = kMaxNVDataLength;
1337 *value = OSData::withBytes(prop->data, length);
1395 OSData *IODTNVRAM::unescapeBytesToData(const UInt8 *bytes, UInt32 length)
1403 // Calculate the actual length of the data.
1406 for (cnt = 0; cnt < length;) {
1424 for (cnt = 0; cnt < length;) {