Use a default execution type if none of the listed ones match. This
uses the first type listed in the array as the default type. This isn't perfect, but I thought it would be better than nothing.
This commit is contained in:
parent
b43abe2d55
commit
3625b5147c
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=38897
@ -31,7 +31,7 @@
|
|||||||
|
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
static const char rcsid[] =
|
static const char rcsid[] =
|
||||||
"$Id: main.c,v 1.9 1998/07/06 21:01:47 bde Exp $";
|
"$Id: main.c,v 1.10 1998/08/24 10:17:20 cracauer Exp $";
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -78,6 +78,10 @@ usage(void)
|
|||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* WARNING! "FreeBSD a.out" must be first, or set_etype will not
|
||||||
|
* work correctly.
|
||||||
|
*/
|
||||||
struct ex_types {
|
struct ex_types {
|
||||||
char *type;
|
char *type;
|
||||||
void (*enter_syscall)(int, int);
|
void (*enter_syscall)(int, int);
|
||||||
@ -115,6 +119,11 @@ set_etype() {
|
|||||||
if (!strcmp(funcs->type, progtype))
|
if (!strcmp(funcs->type, progtype))
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
if (funcs == NULL) {
|
||||||
|
warn("Execution type %s is not supported -- using FreeBSD a.out\n",
|
||||||
|
progtype);
|
||||||
|
funcs = &ex_types[0];
|
||||||
|
}
|
||||||
return funcs;
|
return funcs;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user