diff options
author | Jordan Hargrave <jordan@cvs.openbsd.org> | 2006-10-25 21:23:20 +0000 |
---|---|---|
committer | Jordan Hargrave <jordan@cvs.openbsd.org> | 2006-10-25 21:23:20 +0000 |
commit | 50a7169d7eaae6c96dab0c36e4866a70b233919d (patch) | |
tree | 7eeec6a5ea20b61fc15bf9213bf50fa1212733d9 /sys/dev | |
parent | 6682c9b61d45e26b30159005b0d3bdb4a91b3909 (diff) |
Don't convert buffer/field output to integer
Caused problems with strings/index on some systems
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/acpi/dsdt.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sys/dev/acpi/dsdt.c b/sys/dev/acpi/dsdt.c index 68c30e17fb9..56a4cecb28a 100644 --- a/sys/dev/acpi/dsdt.c +++ b/sys/dev/acpi/dsdt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dsdt.c,v 1.59 2006/10/25 20:55:47 jordan Exp $ */ +/* $OpenBSD: dsdt.c,v 1.60 2006/10/25 21:23:19 jordan Exp $ */ /* * Copyright (c) 2005 Jordan Hargrave <jordan@openbsd.org> * @@ -827,6 +827,12 @@ aml_setbufint(struct aml_value *dst, int bitpos, int bitlen, { if (src->type != AML_OBJTYPE_BUFFER) aml_die("wrong setbufint type\n"); + +#if 1 + /* Return buffer type */ + _aml_setvalue(dst, AML_OBJTYPE_BUFFER, (bitlen+7)>>3, NULL); + aml_bufcpy(dst->v_buffer, 0, src->v_buffer, bitpos, bitlen); +#else if (bitlen < aml_intlen) { /* XXX: Endian issues?? */ /* Return integer type */ @@ -838,6 +844,7 @@ aml_setbufint(struct aml_value *dst, int bitpos, int bitlen, _aml_setvalue(dst, AML_OBJTYPE_BUFFER, (bitlen+7)>>3, NULL); aml_bufcpy(dst->v_buffer, 0, src->v_buffer, bitpos, bitlen); } +#endif } /* Copy from a string/integer/buffer to a bufferfield */ |