LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
Password
Linux - Embedded & Single-board computer This forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.

Notices



Reply
 
Search this Thread
Old 03-22-2011, 07:18 AM   #1
linwhwylb
LQ Newbie
 
Registered: Oct 2010
Posts: 8

Rep: Reputation: 0
problem on cdev structure


In the file include/linux/cdev.h at the kernel source tree we can find the definition of the structure cdev
Code:
 13 struct cdev {
 14     struct kobject kobj;
 15     struct module *owner;
 16     const struct file_operations *ops;
 17     struct list_head list;
 18     dev_t dev;
 19     unsigned int count;
 20 };
Above, the filed
dev_t dev - Initial major and minor numbers assigned to the device driver, We can use the macro MAJOR(dev) and MINOR(dev) to get the major and the minor number respectively.
unsigned int count - Size of the range of device numbers assigned to the device driver
But here I'm confused with the count filed, it standard for the minor or the major numbers?
 
Old 04-19-2011, 04:38 PM   #2
ozanbaba
Member
 
Registered: May 2003
Location: Tengiz
Distribution: Slackware64 14.1
Posts: 671

Rep: Reputation: 94
http://www.fsl.cs.sunysb.edu/kernel-api/re943.html
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert directory structure from long file names in Linux to DOS 8.3 structure? manorina Linux - Software 5 09-12-2009 10:18 AM
Home Jail Folder Structure like Gobolinux Directory Structure luispt Linux - General 3 07-26-2008 07:46 PM
A data structure problem Asuralm Programming 1 12-24-2007 08:49 AM
Iptables problem - Linux 2.6.16 and structure changes, what do I do? mohawx Linux - Newbie 4 04-30-2006 02:28 PM
Database Problem, File Structure Help Kazul Linux - Networking 1 03-08-2006 08:38 AM


All times are GMT -5. The time now is 12:17 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration