Skip to content

Commit

Permalink
interpreter: make uacpi_osi typecheck log errors
Browse files Browse the repository at this point in the history
This also makes it return the correct status code for this case.

Signed-off-by: Daniil Tatianin <99danilt@gmail.com>
  • Loading branch information
d-tatianin committed May 29, 2024
1 parent f00c310 commit a387fcf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions source/interpreter.c
Original file line number Diff line number Diff line change
Expand Up @@ -5728,9 +5728,9 @@ uacpi_status uacpi_osi(uacpi_handle handle, uacpi_object *retval)

arg = uacpi_unwrap_internal_reference(ctx->cur_frame->args[0]);
if (arg->type != UACPI_OBJECT_STRING) {
uacpi_warn("_OSI: invalid argument type %s, expected a String\n",
uacpi_object_type_to_string(arg->type));
return UACPI_STATUS_INVALID_ARGUMENT;
uacpi_error("_OSI: invalid argument type %s, expected a String\n",
uacpi_object_type_to_string(arg->type));
return UACPI_STATUS_AML_INCOMPATIBLE_OBJECT_TYPE;
}

if (retval == UACPI_NULL)
Expand Down

0 comments on commit a387fcf

Please sign in to comment.