misc device question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,kernelnewbies

I am trying to develop a misc driver in 3.7.0 kernel.

As a basis I copy and paste this code, *without any change*,

http://virtlog.com/2008/03/25/linux-miscdevice-sample/

And build it.
after insmod I have :
[root@n miscDevice]\>ls -al /dev/mymisc
crw------- 1 root root 10, 59 Dec 19 10:24 /dev/mymisc


However, when trying to open this file I get:
open: No such file or directory

Any ideas why ?

The program with which I try to open the device is simple, a few lines
following here:
int main()
{
  int fd;

  fd = open("/dev/mymodule", O_RDONLY);
	if (fd == -1) {
		perror("open");
		exit(1);
	}
  printf("open succeeded\n");	

}

Any ideas why this error ?

rgs,
Kevin

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux