2 * This file contains the main function for the server. It waits for a request
3 * and then send a response.
7 #include <minix/optset.h>
9 static struct optset optset_table
[] = {
10 { "norock", OPT_BOOL
, &opt
.norock
, TRUE
},
14 static int sef_cb_init_fresh(int __unused type
,
15 sef_init_info_t
* __unused info
)
17 /* Initialize the iso9660fs server. */
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
);
35 static void sef_cb_signal_handler(int signo
)
37 /* Only check for termination signal, ignore anything else. */
38 if (signo
!= SIGTERM
) return;
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. */
56 int main(int argc
, char *argv
[])
58 /* SEF local startup. */
59 env_setargs(argc
, argv
);
62 fsdriver_task(&isofs_table
);