rsc | a84cbb2 | 2004-04-19 19:29:25 +0000 | [diff] [blame] | 1 | #include <u.h> |
2 | #include <libc.h> | ||||
3 | #include <bio.h> | ||||
4 | #include <mach.h> | ||||
5 | |||||
6 | Mach *mach; | ||||
7 | |||||
8 | extern Mach mach386; | ||||
9 | extern Mach machpower; | ||||
10 | |||||
11 | static Mach *machs[] = | ||||
12 | { | ||||
13 | &mach386, | ||||
14 | &machpower, | ||||
15 | }; | ||||
16 | |||||
17 | Mach* | ||||
18 | machbyname(char *name) | ||||
19 | { | ||||
20 | int i; | ||||
21 | |||||
22 | for(i=0; i<nelem(machs); i++) | ||||
23 | if(strcmp(machs[i]->name, name) == 0){ | ||||
24 | mach = machs[i]; | ||||
25 | return machs[i]; | ||||
26 | } | ||||
27 | werrstr("machine '%s' not found", name); | ||||
28 | return nil; | ||||
29 | } | ||||
30 |