int fusefs_process() { /* This gets exactly 1 command out of fuse fd. */ /* Ideally, this is triggered after a select() returns */ if (fuse_instance != NULL) { struct fuse_cmd *cmd; if (fuse_exited(fuse_instance)) return 0; cmd = fuse_read_cmd(fuse_instance); if (cmd == NULL) return 1; fuse_process_cmd(fuse_instance, cmd); } return 1; }
//Process one fuse command (ie after IO.select) int intern_fuse_process(struct intern_fuse *inf) { if (inf->fuse == NULL) { return -1; } if (fuse_exited(inf->fuse)) { return -1; } struct fuse_cmd *cmd; cmd = fuse_read_cmd(inf->fuse); if (cmd != NULL) { fuse_process_cmd(inf->fuse, cmd); } return 0; }