#include "p11-tests.h" #include #include #include static void usage() { fprintf(stderr, "usage: p11-tests module [init_string]\n"); exit(2); } int main(int argc, char* argv[]) { int ch; while((ch = getopt(argc, argv, "")) != -1) { switch(ch) { case '?': default: usage(); break; } } argc -= optind; argv += optind; if(argc < 1 || argc > 2) usage(); p11t_module_load(argv[0]); p11t_module_unload(); return 0; }