• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/drivers/acpi/acpica/

Lines Matching defs:buffer

61  * DESCRIPTION: Copy a buffer object to another buffer object.
69 u8 *buffer;
79 /* We know that source_desc is a buffer by now */
81 buffer = ACPI_CAST_PTR(u8, source_desc->buffer.pointer);
82 length = source_desc->buffer.length;
85 * If target is a buffer of length zero or is a static buffer,
86 * allocate a new buffer of the proper length
88 if ((target_desc->buffer.length == 0) ||
90 target_desc->buffer.pointer = ACPI_ALLOCATE(length);
91 if (!target_desc->buffer.pointer) {
95 target_desc->buffer.length = length;
98 /* Copy source buffer to target buffer */
100 if (length <= target_desc->buffer.length) {
102 /* Clear existing buffer and copy in the new one */
104 ACPI_MEMSET(target_desc->buffer.pointer, 0,
105 target_desc->buffer.length);
106 ACPI_MEMCPY(target_desc->buffer.pointer, buffer, length);
110 * NOTE: ACPI versions up to 3.0 specified that the buffer must be
111 * truncated if the string is smaller than the buffer. However, "other"
113 * standard. ACPI 3.0_a changes this behavior such that the buffer
119 * If the original source was a string, we must truncate the buffer,
121 * copy must not truncate the original buffer.
127 target_desc->buffer.length = length;
133 ACPI_MEMCPY(target_desc->buffer.pointer, buffer,
134 target_desc->buffer.length);
137 "Truncating source buffer from %X to %X\n",
138 length, target_desc->buffer.length));
143 target_desc->buffer.flags = source_desc->buffer.flags;
166 u8 *buffer;
178 buffer = ACPI_CAST_PTR(u8, source_desc->string.pointer);
188 * String will fit in existing non-static buffer.
193 ACPI_MEMCPY(target_desc->string.pointer, buffer, length);
196 * Free the current buffer, then allocate a new buffer
214 ACPI_MEMCPY(target_desc->string.pointer, buffer, length);