summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcanacar <canacar@openbsd.org>2006-06-14 16:30:07 +0000
committercanacar <canacar@openbsd.org>2006-06-14 16:30:07 +0000
commit2eac7e65241f7014c2a29f5fd8dc267be557332f (patch)
tree425c2af89293398fd7b5987387a755751501feed
parentuseless casts are so the 80s (diff)
downloadwireguard-openbsd-2eac7e65241f7014c2a29f5fd8dc267be557332f.tar.xz
wireguard-openbsd-2eac7e65241f7014c2a29f5fd8dc267be557332f.zip
Allow changes to a Name initialized with a 'static' value.
Problem report (PR5149), and debugging by jj.roh at thurnherr dot ch ok marco@
-rw-r--r--sys/dev/acpi/dsdt.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/dev/acpi/dsdt.c b/sys/dev/acpi/dsdt.c
index 3e01996ce08..91bb4c876af 100644
--- a/sys/dev/acpi/dsdt.c
+++ b/sys/dev/acpi/dsdt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dsdt.c,v 1.46 2006/05/31 14:02:12 canacar Exp $ */
+/* $OpenBSD: dsdt.c,v 1.47 2006/06/14 16:30:07 canacar Exp $ */
/*
* Copyright (c) 2005 Jordan Hargrave <jordan@openbsd.org>
*
@@ -1722,6 +1722,8 @@ aml_addvname(struct acpi_context *ctx, const char *name, int opcode,
pn->opcode = opcode;
pn->mnem = aml_opname(opcode);
if (val != NULL) {
+ if (val->type == AML_OBJTYPE_STATICINT)
+ val = aml_allocvalue(AML_OBJTYPE_INTEGER, val->v_integer, NULL);
val->name = name;
val->node = pn;
}