diff options
author | gshapiro <gshapiro@FreeBSD.org> | 2002-08-04 22:14:44 +0000 |
---|---|---|
committer | gshapiro <gshapiro@FreeBSD.org> | 2002-08-04 22:14:44 +0000 |
commit | ce61bcc9309608ed934085dcd77263c5b258e836 (patch) | |
tree | dd449ed280a63349dbe643c4430574e1644edf5a | |
parent | 10249f94498eb63f059deb5fb4c3e6018a1f3b46 (diff) | |
download | FreeBSD-src-ce61bcc9309608ed934085dcd77263c5b258e836.zip FreeBSD-src-ce61bcc9309608ed934085dcd77263c5b258e836.tar.gz |
Pass envp to crunched program's main() routines as some depend on it.
Note that crunchgen's stub .c programs already have the code to use it:
"int _crunched_%s_stub(int argc, char **argv, char **envp)"
"{return main(argc,argv,envp);}\" >%s_stub.c\n",
Add $FreeBSD$ to allow the commit.
Reviewed by: luigi
MFC after: 3 days
-rw-r--r-- | usr.sbin/crunch/crunchgen/crunched_main.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.sbin/crunch/crunchgen/crunched_main.c b/usr.sbin/crunch/crunchgen/crunched_main.c index 5ebf04f..5c23d7f 100644 --- a/usr.sbin/crunch/crunchgen/crunched_main.c +++ b/usr.sbin/crunch/crunchgen/crunched_main.c @@ -22,6 +22,8 @@ * Author: James da Silva, Systems Design and Analysis Group * Computer Science Department * University of Maryland at College Park + * + * $FreeBSD$ */ /* * crunched_main.c - main program for crunched binaries, it branches to a @@ -41,7 +43,7 @@ struct stub { extern struct stub entry_points[]; -int main(int argc, char **argv) +int main(int argc, char **argv, char **envp) { char *slash, *basename; struct stub *ep; @@ -56,7 +58,7 @@ int main(int argc, char **argv) if(!strcmp(basename, ep->name)) break; if(ep->name) - return ep->f(argc, argv); + return ep->f(argc, argv, envp); else { fprintf(stderr, "%s: %s not compiled in\n", EXECNAME, basename); crunched_usage(); |