Sponsored Content
Operating Systems Linux Fedora Is Kernel module is the same as a device driver? Post 302519639 by Perderabo on Wednesday 4th of May 2011 01:22:56 PM
Old 05-04-2011
Well I didn't really "need" any particular major number. Somehow "1" just came quickly to mind as something to use as an example. Then I was just showing the link betwen the driver and the device file (which is major number). As I said, the drivers are listed in that /usr/include/linux/major.h file so I guess you could say that "maps it out". I really don't know what info you're looking for... Smilie
 

4 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Kernel and Device Driver Programming

I am looking for a guide on how to program for either the Linux or FreeBSD (includes 4.4BSD, NetBSD or OpenBSD) kernel. I would prefer to learn how to write device drivers, but anything would help. If you know, please email me at *removed* or leave a post here Regards, Farhan (0 Replies)
Discussion started by: Farhan
0 Replies

2. Solaris

SUNWglmr -- rasctrl environment monitoring driver for i2c or SCSI device driver ?

I've been researching minimizeing Solaris 8 and found that on the web page http://www.sun.com/bigadmin/content/packagelist/s8u7PkgList/p2.html the package SUNWglmr is listed as "rasctrl environment monitoring driver for i2c, (Root) (32-bit)" while in the document "Solaris 8 minimize-updt1.pdf"... (1 Reply)
Discussion started by: roygoodwin
1 Replies

3. Linux

Linux Device Driver: avoid mem copy from/to user/kernel space

I recently started working with Linux and wrote my first device driver for a hardware chip controlled by a host CPU running Linux 2.6.x kernel. 1. The user space process makes an IOCTL call with pointer to a user memory buffer. 2. The kernel device driver in the big switch-case of IOCTL,... (1 Reply)
Discussion started by: agaurav
1 Replies

4. UNIX for Advanced & Expert Users

Get pointer for existing device class (struct class) in Linux kernel module

Hi all! I am trying to register a device in an existing device class, but I am having trouble getting the pointer to an existing class. I can create a class in a module, get the pointer to it and then use it to register the device with: *cl = class_create(THIS_MODULE, className);... (0 Replies)
Discussion started by: hdaniel@ualg.pt
0 Replies
autopush(1M)						  System Administration Commands					      autopush(1M)

NAME
autopush - configures lists of automatically pushed STREAMS modules SYNOPSIS
autopush -f filename autopush -g -M major -m minor autopush -r -M major -m minor DESCRIPTION
The autopush command configures the list of modules to be automatically pushed onto the stream when a device is opened. It can also be used to remove a previous setting or get information on a setting. OPTIONS
The following options are supported: -f filename Sets up the autopush configuration for each driver according to the information stored in filename. An autopush file consists of lines of four or more fields, separated by spaces as shown below: major minor last-minor module1 module2 ... module8 The first field is a string that specifies the major device name, as listed in the /kernel/drv directory. The next two fields are inte- gers that specify the minor device number and last-minor device number. The fields following represent the names of modules. If minor is -1, then all minor devices of a major driver specified by major are configured, and the value for last-minor is ignored. If last- minor is 0, then only a single minor device is configured. To configure a range of minor devices for a particular major, minor must be less than last-minor. The remaining fields list the names of modules to be automatically pushed onto the stream when opened, along with the position of an optional anchor. The maximum number of modules that can be pushed is eight. The modules are pushed in the order they are specified. The optional special character sequence [anchor] indicates that a STREAMS anchor should be placed on the stream at the module previously specified in the list; it is an error to specify more than one anchor or to have an anchor first in the list. A nonzero exit status indicates that one or more of the lines in the specified file failed to complete successfully. -g Gets the current configuration setting of a particular major and minor device number specified with the -M and -m options respectively and displays the autopush modules associated with it. It will also return the starting minor device number if the request corresponds to a setting of a range (as described with the -f option). -m minor Specifies the minor device number. -M major Specifies the major device number. -r Removes the previous configuration setting of the particular major and minor device number specified with the -M and -m options respec- tively. If the values of major and minor correspond to a previously established setting of a range of minor devices, where minor matches the first minor device number in the range, the configuration would be removed for the entire range. EXIT STATUS
The following exit values are returned: 0 Successful completion. non-zero An error occurred. EXAMPLES
Example 1 Using the autopush command. The following example gets the current configuration settings for the major and minor device numbers as indicated and displays the autopush modules associated with them for the character-special device /dev/term/a: example# autopush -g -M 29 -m 0 Major Minor Lastminor Modules 29 0 1 ldterm ttcompat FILES
/etc/iu.ap ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ SEE ALSO
dladm(1M), ttymon(1M), attributes(5), ldterm(7M), sad(7D), streamio(7I), ttcompat(7M) NOTES
The use of the autopush command is obsolete for networking data-links. The preferred method of configuring a list of automatically pushed STREAMS modules on a given networking data-link interface is the dladm(1M) autopush link property. Because network devices are self-cloning, the autopush command is inadequate for networking devices. The granularity of the autopush com- mand's configuration is driver-wide, and not per-interface as one might expect. Another reason not to use autopush is that administrators are more familiar with the names of their network interfaces than with device major and minor numbers. The dladm(1M) command allows the configuration using data-link interface names. SunOS 5.11 15 Feb 2008 autopush(1M)
All times are GMT -4. The time now is 06:25 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy