libmach
This commit is contained in:
parent
0e3cc9f456
commit
a84cbb2a17
53 changed files with 12038 additions and 0 deletions
30
src/libmach/mach.c
Normal file
30
src/libmach/mach.c
Normal file
|
|
@ -0,0 +1,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;
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue