Blob


1 #include <u.h>
2 #include <libc.h>
3 #include <bio.h>
4 #include <mach.h>
6 Mach *mach;
8 extern Mach mach386;
9 extern Mach machpower;
11 static Mach *machs[] =
12 {
13 &mach386,
14 &machpower,
15 };
17 Mach*
18 machbyname(char *name)
19 {
20 int i;
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 }