blob: 89a88f160d6e755b142c98f732b1ccea1d0cef7e [file] [log] [blame]
rsca84cbb22004-04-19 19:29:25 +00001#include <u.h>
2#include <libc.h>
3#include <bio.h>
4#include <mach.h>
5
6Mach *mach;
7
8extern Mach mach386;
9extern Mach machpower;
10
11static Mach *machs[] =
12{
13 &mach386,
14 &machpower,
15};
16
17Mach*
18machbyname(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