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