return the size of the referenced object. This fixes a panic on the ASUS
eeePC 1000H when attaching the acpiasus(4) driver.
Issue reported and fix tested by robert@
ok marco@
-/* $OpenBSD: dsdt.c,v 1.130 2008/06/14 21:40:16 jordan Exp $ */
+/* $OpenBSD: dsdt.c,v 1.131 2008/08/14 17:41:20 jsing Exp $ */
/*
* Copyright (c) 2005 Jordan Hargrave <jordan@openbsd.org>
*
break;
case AMLOP_SIZEOF:
/* Sizeof: S => i */
- ival = opargs[0]->length;
+ if (opargs[0]->type == AML_OBJTYPE_OBJREF)
+ ival = opargs[0]->v_objref.ref->length;
+ else
+ ival = opargs[0]->length;
break;
case AMLOP_OBJECTTYPE:
/* ObjectType: S => i */