All pastes #82594 Raw Edit

Unnamed

public text v1 · immutable
·published 2006-07-08 18:35 UTC
rendered paste body
int dev_event_init(void){


	if (!(fp_event = open(EV_FILE, O_RDONLY))) {
		perror("failed to open event device");
		return -1;
	}
    
    if ((ioctl(fp_event, EVIOCGRAB)) == -1) {
		perror("failed to grab the device");
		return -1;
	}

}