1 /* This file contains the SFFS initialization code and message loop.
3 * The entry points into this file are:
4 * sffs_init initialization
5 * sffs_signal signal handler
6 * sffs_loop main message loop
9 * April 2009 (D.C. van Moolenbroek)
14 /*===========================================================================*
16 *===========================================================================*/
17 int sffs_init(char *name
, const struct sffs_table
*table
,
18 struct sffs_params
*params
)
20 /* Initialize this file server. Called at startup time.
24 /* Make sure that the given path prefix doesn't end with a slash. */
25 i
= strlen(params
->p_prefix
);
26 while (i
> 0 && params
->p_prefix
[i
- 1] == '/') i
--;
27 params
->p_prefix
[i
] = 0;
36 /*===========================================================================*
38 *===========================================================================*/
39 void sffs_signal(int signo
)
42 /* Only check for termination signal, ignore anything else. */
43 if (signo
!= SIGTERM
) return;
45 dprintf(("%s: got SIGTERM\n", sffs_name
));
50 /*===========================================================================*
52 *===========================================================================*/
55 /* The main function of this file server. Libfsdriver does the real work.
58 fsdriver_task(&sffs_dtable
);