diff --git a/usr.sbin/crunch/crunchgen/crunched_main.c b/usr.sbin/crunch/crunchgen/crunched_main.c index a07317aa5a6b..662b87c9c45a 100644 --- a/usr.sbin/crunch/crunchgen/crunched_main.c +++ b/usr.sbin/crunch/crunchgen/crunched_main.c @@ -64,6 +64,21 @@ int main(int argc, char **argv) } +int crunched_here(char *path) +{ + char *slash, *basename; + struct stub *ep; + + slash = strrchr(path, '/'); + basename = slash? slash+1 : path; + + for(ep=entry_points; ep->name != NULL; ep++) + if(!strcmp(basename, ep->name)) + return 1; + return 0; +} + + int crunched_main(int argc, char **argv) { struct stub *ep;