I know you can read raw data from devices in linux... But is it first in best dressed?
For example, dump.txt remains blank in the following:
I know my mouse is in use by X but, should I be able to read the raw data too?
FILE * device, * out;
if((device = fopen("/dev/input/mouse0", "rb")) == NULL)
perror("Failed to open the device");
if((out = fopen("dump.txt", "wb")) == NULL)
perror("Failed to open dump.txt");
cc = fgetc(device);
What am I doing wrong?
Thanks in advance