- if (max_length > ACPI_MAX_STRING_CONVERSION) {
- if (string_length > ACPI_MAX_STRING_CONVERSION) {
- return_ACPI_STATUS (AE_AML_STRING_LIMIT);
- }
+ case ACPI_IMPLICIT_CONVERT_HEX:
+ /*
+ * From the ACPI spec:
+ *"The entire contents of the buffer are converted to a string of
+ * two-character hexadecimal numbers, each separated by a space."
+ */
+ separator = ' ';
+ string_length = (obj_desc->buffer.length * 3);
+ break;
+
+ case ACPI_EXPLICIT_CONVERT_HEX: /* Used by to_hex_string operator */
+ /*
+ * From ACPI: "If Data is a buffer, it is converted to a string of
+ * hexadecimal values separated by commas."
+ */
+ string_length = (obj_desc->buffer.length * 3);
+ break;
+
+ default:
+ return_ACPI_STATUS (AE_BAD_PARAMETER);