-/* $OpenBSD: acpiprt.c,v 1.50 2020/12/17 17:57:19 kettenis Exp $ */
+/* $OpenBSD: acpiprt.c,v 1.51 2021/03/10 21:49:55 patrick Exp $ */
/*
* Copyright (c) 2006 Mark Kettenis <kettenis@openbsd.org>
*
pp = v->v_package[2];
if (pp->type == AML_OBJTYPE_NAMEREF) {
- node = aml_searchrel(sc->sc_devnode, pp->v_nameref);
+ node = aml_searchrel(sc->sc_devnode,
+ aml_getname(pp->v_nameref));
if (node == NULL) {
printf("Invalid device\n");
return;
-/* $OpenBSD: acpipwrres.c,v 1.9 2020/12/17 17:57:19 kettenis Exp $ */
+/* $OpenBSD: acpipwrres.c,v 1.10 2021/03/10 21:49:55 patrick Exp $ */
/*
* Copyright (c) 2013 Martin Pieuchot <mpi@openbsd.org>
if (ref->type == AML_OBJTYPE_NAMEREF) {
struct aml_node *pnode;
- pnode = aml_searchrel(&aml_root, ref->v_nameref);
+ pnode = aml_searchrel(&aml_root,
+ aml_getname(ref->v_nameref));
if (pnode == NULL) {
DPRINTF(("%s: device %s not found\n",
DEVNAME(sc), ref->v_string));
-/* $OpenBSD: acpitz.c,v 1.55 2020/12/17 17:57:19 kettenis Exp $ */
+/* $OpenBSD: acpitz.c,v 1.56 2021/03/10 21:49:55 patrick Exp $ */
/*
* Copyright (c) 2006 Can Erkin Acar <canacar@openbsd.org>
* Copyright (c) 2005 Marco Peereboom <marco@openbsd.org>
ref = res1.v_package[y];
if (ref->type == AML_OBJTYPE_NAMEREF) {
node = aml_searchrel(sc->sc_devnode,
- ref->v_nameref);
+ aml_getname(ref->v_nameref));
if (node == NULL) {
printf("%s: %s[%d.%d] _PR0"
" not a valid device\n",
-/* $OpenBSD: atk0110.c,v 1.16 2020/12/17 17:57:19 kettenis Exp $ */
+/* $OpenBSD: atk0110.c,v 1.17 2021/03/10 21:49:55 patrick Exp $ */
/*
* Copyright (c) 2009 Constantine A. Murenin <cnst+openbsd@bugmail.mojo.ru>
void aibs_attach_sif(struct aibs_softc *, enum sensor_type);
void aibs_attach_new(struct aibs_softc *);
-void aibs_add_sensor(struct aibs_softc *, char *);
+void aibs_add_sensor(struct aibs_softc *, const char *);
void aibs_refresh_r(struct aibs_softc *, struct aibs_sensor *);
int aibs_getvalue(struct aibs_softc *, int64_t, int64_t *);
int aibs_getpack(struct aibs_softc *, struct aml_node *, int64_t,
DEVNAME(sc), name, i, v[0]->type);
continue;
}
- aibs_add_sensor(sc, v[0]->v_nameref);
+ aibs_add_sensor(sc, aml_getname(v[0]->v_nameref));
}
aml_freevalue(&res);
}
void
-aibs_add_sensor(struct aibs_softc *sc, char *name)
+aibs_add_sensor(struct aibs_softc *sc, const char *name)
{
struct aml_value ri;
struct aibs_sensor *as;
-/* $OpenBSD: dsdt.c,v 1.258 2021/03/07 22:53:46 yasuoka Exp $ */
+/* $OpenBSD: dsdt.c,v 1.259 2021/03/10 21:49:55 patrick Exp $ */
/*
* Copyright (c) 2005 Jordan Hargrave <jordan@openbsd.org>
*
if (arg == NULL)
aml_fixup_node(node, node->value);
else if (val->type == AML_OBJTYPE_NAMEREF) {
- node = aml_searchname(node, val->v_nameref);
+ node = aml_searchname(node, aml_getname(val->v_nameref));
if (node && node->value) {
_aml_setvalue(val, AML_OBJTYPE_OBJREF, AMLOP_NAMECHAR,
node->value);
aml_copyvalue(lhs, rhs);
break;
case AML_OBJTYPE_NAMEREF:
- node = __aml_searchname(scope->node, lhs->v_nameref, 1);
+ node = __aml_searchname(scope->node,
+ aml_getname(lhs->v_nameref), 1);
if (node == NULL) {
- aml_die("Could not create node %s", lhs->v_nameref);
+ aml_die("Could not create node %s",
+ aml_getname(lhs->v_nameref));
}
aml_copyvalue(node->value, rhs);
break;
-/* $OpenBSD: dsdt.h,v 1.78 2020/09/16 11:52:17 jsg Exp $ */
+/* $OpenBSD: dsdt.h,v 1.79 2021/03/10 21:49:55 patrick Exp $ */
/*
* Copyright (c) 2005 Marco Peereboom <marco@openbsd.org>
*
int64_t aml_val2int(struct aml_value *);
struct aml_node *aml_searchname(struct aml_node *, const void *);
struct aml_node *aml_searchrel(struct aml_node *, const void *);
+const char *aml_getname(const char *);
struct aml_value *aml_getstack(struct aml_scope *, int);
struct aml_value *aml_allocvalue(int, int64_t, const void *);