summaryrefslogtreecommitdiff
path: root/sys/src/9
diff options
context:
space:
mode:
authormia soweli <inbox@tachibana-labs.org>2023-05-18 20:13:14 +0000
committerSigrid Solveig Haflínudóttir <sigrid@ftrv.se>2023-05-18 20:13:14 +0000
commit93837692bbaab28e01ea1178d8867047bbcad11d (patch)
treee2dc7f78bb406fac21226106c3f3c86ce556e231 /sys/src/9
parent0883ed0a61c38898ad926ea67eb0e9386dff4ecd (diff)
libaml: tow eisaid inside the environment
Diffstat (limited to 'sys/src/9')
-rw-r--r--sys/src/9/pc/archacpi.c24
1 files changed, 2 insertions, 22 deletions
diff --git a/sys/src/9/pc/archacpi.c b/sys/src/9/pc/archacpi.c
index f1b675a43..c6b0b8180 100644
--- a/sys/src/9/pc/archacpi.c
+++ b/sys/src/9/pc/archacpi.c
@@ -274,26 +274,6 @@ Foundbus:
bus->aintr = ai;
}
-static char*
-eisaid(void *v)
-{
- static char id[8];
- ulong b, l;
- int i;
-
- if(amltag(v) == 's')
- return v;
- b = amlint(v);
- for(l = 0, i=24; i>=0; i -= 8, b >>= 8)
- l |= (b & 0xFF) << i;
- id[7] = 0;
- for(i=6; i>=3; i--, l >>= 4)
- id[i] = "0123456789ABCDEF"[l & 0xF];
- for(i=2; i>=0; i--, l >>= 5)
- id[i] = '@' + (l & 0x1F);
- return id;
-}
-
static int
pcibusno(void *dot)
{
@@ -305,7 +285,7 @@ pcibusno(void *dot)
id = nil;
if((x = amlwalk(dot, "^_HID")) != nil)
if((p = amlval(x)) != nil)
- id = eisaid(p);
+ id = amleisaid(p);
if((x = amlwalk(dot, "^_BBN")) == nil)
if((x = amlwalk(dot, "^_ADR")) == nil)
return -1;
@@ -515,7 +495,7 @@ enumec(void *dot, void *)
char *id;
b = nil;
- id = eisaid(amlval(amlwalk(dot, "^_HID")));
+ id = amleisaid(amlval(amlwalk(dot, "^_HID")));
if(id == nil || strcmp(id, "PNP0C09") != 0)
return 1;
if((x = amlwalk(dot, "^_CRS")) == nil)