I'm trying to port an old program compiled on kernel 2.4, onto kernel 2.6. I've using a Mandriva 2009.1 box as my development PC. I've managed to get the program to build properly once I've gotten the necessary libraries, and it also runs.

However, one of the first things that the program does is to bind the raw devices(already set up as separate logical partitions within the drive as /dev/sdaN) to /dev/rawN, in order to access them later directly.

To do so, the first thing that it does is to open /dev/rawctl with the following code:

if ((master_fd = open("/dev/rawctl", O_RDWR, 0)) < 0) {
  return ERR_FAILURE;
However, open always returns -1, hence the program fails at this point.

Has anything changed between kernel 2.4 and 2.6 that may cause a failure when I try to open /dev/rawctl?