Re: Getting the major number of the device

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

 



[1] Use STDIN and STDOUT operation from C program and
Shell Script to communicate the values.
[2] Write a simple C program to read /proc/devices and
extract the major number of the devices directly

 --- Anjaneyulu <anjaneyulu@mistralsoftware.com>
wrote: > Hi,
> I am creating the device file using mknod() function
> in the C program based on some check.
> I want the major number associated with the device (
> i registered the device in insmod using dynamic
> allocation.)
> I can run a script (which is given in the Linux
> device driver 2 - allexandro rubini) to get it. But
> i need it in my C program.
> Can I exchange information from a script to C
> program? If yes, how????
> 
> 
> 
> Thanks in advance.
> 
> Regards,
> Anj
> 
>  

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[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