Symorder complains if INET isn't in the kernel. I added '-m' to inform it

that it should exit(0) even if this is so.  fixed a /386bsd -> /kernel in
the man-page while at it.
This commit is contained in:
Poul-Henning Kamp 1994-10-16 22:01:44 +00:00
parent afc889a280
commit 3972fa6670
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=3651
2 changed files with 10 additions and 4 deletions

View file

@ -39,6 +39,7 @@
.Nd rearrange name list
.Sh SYNOPSIS
.Nm symorder
.Fl m
.Fl t Ar symlist file
.Sh DESCRIPTION
The file
@ -57,11 +58,13 @@ are relocated to the beginning of the table and in the order given.
.It Fl t
Restrict the symbol table to the symbols listed in
.Ar symlist .
.It Fl m
Exit with status zero, even if some symbols are missing.
.El
.Pp
This program was specifically designed to cut down on the
overhead of getting symbols from
.Pa /386bsd.
.Pa /kernel.
.Sh DIAGNOSTICS
The
.Nm symorder

View file

@ -67,7 +67,7 @@ struct exec exec;
struct stat stb;
struct nlist *newtab, *symtab;
off_t sa;
int nsym, strtabsize, symfound, small;
int nsym, strtabsize, symfound, small, missing;
char *kfile, *newstrings, *strings, asym[BUFSIZ];
main(argc, argv)
@ -82,11 +82,13 @@ main(argc, argv)
register char *start, *t;
int ch, n, o;
while ((ch = getopt(argc, argv, "t")) != EOF)
while ((ch = getopt(argc, argv, "tm")) != EOF)
switch(ch) {
case 't':
small = 1;
break;
case 'm':
missing = 1;
case '?':
default:
usage();
@ -205,7 +207,8 @@ main(argc, argv)
for (i = 0; i < nsym; i++)
if (order[i].n_value == 0)
printf("%s\n", order[i].n_un.n_name);
exit(NOTFOUNDEXIT);
if(!missing)
exit(NOTFOUNDEXIT);
}
exit(OKEXIT);
}