2 #ifdef HAVE_XORG_CONFIG_H
3 #include <xorg-config.h>
11 #include <sys/param.h>
12 #include "xf86_OSlib.h"
14 #include <sys/sysctl.h>
16 axpDevice
bsdGetAXP(void);
19 * BSD does a very nice job providing system information to
20 * user space programs. Unfortunately it doesn't provide all
21 * the information required. Therefore we just obtain the
22 * system type and look up the rest from a list we maintain
31 static _AXP axpList
[] = {
35 {"irongate",IRONGATE
},
47 size_t len
= sizeof(sysname
);
55 mib
[2] = CPU_CHIPSET_TYPE
;
57 if ((error
= sysctl(mib
, 3, &sysname
, &len
, NULL
, 0)) < 0)
59 if ((sysctlbyname("hw.chipset.type", &sysname
, &len
,
62 FatalError("bsdGetAXP: can't find machine type\n");
64 xf86Msg(X_INFO
,"AXP is a: %s\n",sysname
);
67 if (axpList
[i
].name
== NULL
)
69 if (!strcmp(sysname
, axpList
[i
].name
))
70 return axpList
[i
].type
;