示例#1
0
static void
init_commands(void)
{
	attr_init();
	bmap_init();
	fadvise_init();
	file_init();
	freeze_init();
	fsync_init();
	getrusage_init();
	help_init();
	imap_init();
	inject_init();
	madvise_init();
	mincore_init();
	mmap_init();
	open_init();
	parent_init();
	pread_init();
	prealloc_init();
	fiemap_init();
	pwrite_init();
	quit_init();
	resblks_init();
	sendfile_init();
	shutdown_init();
	truncate_init();
}
示例#2
0
int main(int argc, char **argv)
{
	int ret=0;
	signal(SIGINT, fsync_exit);/*register signal handler #include <signal.h>*/
	signal(SIGTERM, fsync_exit);/*register signal handler*/

	if(fsync_deal_arg(argc, argv) < 0)
		fsync_exit();
	if(fsync_init(g_watch) < 0)
		fsync_exit();

	inotify_watch();
	
	fsync_exit();
	return 0;
}