static ACPI_STATUS DtCompileUuid ( UINT8 *Buffer, DT_FIELD *Field, UINT32 ByteLength) { char *InString; ACPI_STATUS Status; InString = Field->Value; Status = AuValidateUuid (InString); if (ACPI_FAILURE (Status)) { sprintf (MsgBuffer, "%s", Field->Value); DtNameError (ASL_ERROR, ASL_MSG_INVALID_UUID, Field, MsgBuffer); } else { AcpiUtConvertStringToUuid (InString, Buffer); } return (Status); }
static void OpcDoUuId ( ACPI_PARSE_OBJECT *Op) { char *InString; UINT8 *Buffer; ACPI_STATUS Status = AE_OK; ACPI_PARSE_OBJECT *NewOp; InString = (char *) Op->Asl.Value.String; Buffer = UtLocalCalloc (16); Status = AuValidateUuid (InString); if (ACPI_FAILURE (Status)) { AslError (ASL_ERROR, ASL_MSG_INVALID_UUID, Op, Op->Asl.Value.String); } else { AcpiUtConvertStringToUuid (InString, Buffer); } /* Change Op to a Buffer */ Op->Asl.ParseOpcode = PARSEOP_BUFFER; Op->Common.AmlOpcode = AML_BUFFER_OP; /* Disable further optimization */ Op->Asl.CompileFlags &= ~NODE_COMPILE_TIME_CONST; UtSetParseOpName (Op); /* Child node is the buffer length */ NewOp = TrAllocateNode (PARSEOP_INTEGER); NewOp->Asl.AmlOpcode = AML_BYTE_OP; NewOp->Asl.Value.Integer = 16; NewOp->Asl.Parent = Op; Op->Asl.Child = NewOp; Op = NewOp; /* Peer to the child is the raw buffer data */ NewOp = TrAllocateNode (PARSEOP_RAW_DATA); NewOp->Asl.AmlOpcode = AML_RAW_DATA_BUFFER; NewOp->Asl.AmlLength = 16; NewOp->Asl.Value.String = (char *) Buffer; NewOp->Asl.Parent = Op->Asl.Parent; Op->Asl.Next = NewOp; }