Files
flexnbd-c/src/main.c

22 lines
379 B
C
Raw Normal View History

2012-06-27 15:45:33 +01:00
#include "util.h"
#include "mode.h"
#include <signal.h>
#include <stdlib.h>
#include <time.h>
2012-06-27 15:45:33 +01:00
2018-02-20 10:05:35 +00:00
int main(int argc, char **argv)
2012-06-27 15:45:33 +01:00
{
2018-02-20 10:05:35 +00:00
signal(SIGPIPE, SIG_IGN); /* calls to splice() unhelpfully throw this */
error_init();
2012-06-27 15:45:33 +01:00
2018-02-20 10:05:35 +00:00
srand(time(NULL));
2018-02-20 10:05:35 +00:00
if (argc < 2) {
exit_err(help_help_text);
}
mode(argv[1], argc - 1, argv + 1); /* never returns */
2012-06-27 15:45:33 +01:00
2018-02-20 10:05:35 +00:00
return 0;
2012-06-27 15:45:33 +01:00
}