patch-2.4.0-prerelease linux/drivers/acpi/common/cmobject.c
Next file: linux/drivers/acpi/common/cmutils.c
Previous file: linux/drivers/acpi/common/cminit.c
Back to the patch index
Back to the overall index
- Lines: 61
- Date:
Fri Dec 29 14:07:21 2000
- Orig file:
v2.4.0-test12/linux/drivers/acpi/common/cmobject.c
- Orig date:
Sun Oct 8 10:50:13 2000
diff -u --recursive --new-file v2.4.0-test12/linux/drivers/acpi/common/cmobject.c linux/drivers/acpi/common/cmobject.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: cmobject - ACPI object create/delete/size/cache routines
- * $Revision: 27 $
+ * $Revision: 34 $
*
*****************************************************************************/
@@ -193,7 +193,7 @@
/* Allocation failed */
_REPORT_ERROR (module_name, line_number, component_id,
- "Could not allocate Object Descriptor");
+ ("Could not allocate an object descriptor\n"));
return (NULL);
}
@@ -424,7 +424,7 @@
case ACPI_TYPE_STRING:
- length += internal_obj->string.length;
+ length += internal_obj->string.length + 1;
break;
@@ -499,10 +499,10 @@
{
ACPI_OPERAND_OBJECT *this_internal_obj;
- ACPI_OPERAND_OBJECT *parent_obj[MAX_PACKAGE_DEPTH] = { 0,0,0,0,0 };
+ ACPI_OPERAND_OBJECT *parent_obj[MAX_PACKAGE_DEPTH];
ACPI_OPERAND_OBJECT *this_parent;
u32 this_index;
- u32 index[MAX_PACKAGE_DEPTH] = { 0,0,0,0,0 };
+ u32 index[MAX_PACKAGE_DEPTH];
u32 length = 0;
u32 object_space;
u32 current_depth = 0;
@@ -510,6 +510,11 @@
ACPI_STATUS status;
+ /* Init the package stack TBD: replace with linked list */
+
+ MEMSET(parent_obj, 0, MAX_PACKAGE_DEPTH);
+ MEMSET(index, 0, MAX_PACKAGE_DEPTH);
+
parent_obj[0] = internal_obj;
while (1) {
@@ -519,7 +524,7 @@
/*
- * Check for 1) An unitialized package element. It is completely
+ * Check for 1) An uninitialized package element. It is completely
* legal to declare a package and leave it uninitialized
* 2) Any type other than a package. Packages are handled
* below.
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)