Remove building with NOCRYPTO option
[minix.git] / minix / fs / isofs / main.c
blob39d40362e4989f8b62e94af2c50209ecd29027f4
1 /*
2 * This file contains the main function for the server. It waits for a request
3 * and then send a response.
4 */
6 #include "inc.h"
7 #include <minix/optset.h>
9 static struct optset optset_table[] = {
10 { "norock", OPT_BOOL, &opt.norock, TRUE },
11 { NULL, 0, NULL, 0 }
14 static int sef_cb_init_fresh(int __unused type,
15 sef_init_info_t * __unused info)
17 /* Initialize the iso9660fs server. */
18 int i;
20 /* Defaults */
21 opt.norock = FALSE;
23 /* If we have been given an options string, parse options here. */
24 for (i = 1; i < env_argc - 1; i++)
25 if (!strcmp(env_argv[i], "-o"))
26 optset_parse(optset_table, env_argv[++i]);
28 setenv("TZ","",1); /* Used to calculate the time */
30 lmfs_buf_pool(NR_BUFS);
32 return OK;
35 static void sef_cb_signal_handler(int signo)
37 /* Only check for termination signal, ignore anything else. */
38 if (signo != SIGTERM) return;
40 fsdriver_terminate();
43 static void sef_local_startup(void)
45 /* Register init callbacks. */
46 sef_setcb_init_fresh(sef_cb_init_fresh);
47 sef_setcb_init_restart(SEF_CB_INIT_RESTART_STATEFUL);
49 /* Register signal callbacks. */
50 sef_setcb_signal_handler(sef_cb_signal_handler);
52 /* Let SEF perform startup. */
53 sef_startup();
56 int main(int argc, char *argv[])
58 /* SEF local startup. */
59 env_setargs(argc, argv);
60 sef_local_startup();
62 fsdriver_task(&isofs_table);
64 return 0;