- 0
- 0
- 约1.16万字
- 约 8页
- 2023-04-25 发布于上海
- 举报
Disclaimer : This document is not valid and is not maintained anymore.
Device File System Guide
Content:
What is devfs?
The (good?) old days
Warning:
Warning: devfs is obsolete and has been removed from the stable 2.6 tree in the 2.6.13 release. Users on 2.6 kernels are hereby advised to switch to udev. For further information on udev, please refer to the Gentoo udev Guide.
Traditional Linux implementations provide their users with an abstract device path, called /dev. Inside this path the user finds device nodes, special files that represent devices inside their system. For instance,
/dev/hda represents the first IDE device in their system. By providing device files to the users, they can create programs that interact with hardware as if the hardware was a regular file instead of using special APIs.
The device files are split in two groups, called character devices and block devices. The first group consists of hardware of which read/writes are not buffered. The second group naturally consists of hardware of which read/writes are buffered. Both devices can be read one character at a time, or in blocks. Therefore, the naming might sound confusing and in fact is wrong.
If you take a look at a certain device file, you might find something like this:
Code Listing 1.1: Checking the information of a device file # ls -l /dev/hda
Code Listing 1.1: Checking the information of a device file # ls -l /dev/hda
brw-rw 1 root disk 3, 0 Jul 5 2000 /dev/hda
In the previous example we see that /dev/hda is a block device. However, more importantly, it has two special numbers assigned to it:3, 0. This pair is called the major-minor pair. It is used by the kernel to map a
device file to a real device. The major corresponds with a certain device, the minor with a subdevice. Seems confusing? It isnt.
Two examples are /dev/hda4 and /dev/tty5. The first device file corresponds with the fourth partition on the first IDE device. Its major-minor pair is 3, 4. In other words, the minor corresp
您可能关注的文档
- 2021年pep小升初英语模拟测试题.docx
- 02197概率论与数理统计重点复习资料.docx
- 06001惠港酒店发文格式.docx
- 06005 统一打卡通知.docx
- 06092工作分析八套试卷 答案.docx
- 10000汉字起笔部首表.docx
- 11000地形测量技术设计.docx
- 20000字起笔部首检字表.docx
- 20148小继教培训心得体会.docx
- 20151人教版三年级数学上册教学工作总结.docx
- 中国国家标准 GB/Z 37551.300-2026海洋能 波浪能、潮流能及其他水流能转换装置 第300部分:河流能转换装置发电性能评估.pdf
- GB/T 44937.3-2025集成电路 电磁发射测量 第3部分:辐射发射测量 表面扫描法.pdf
- 中国国家标准 GB/T 44937.3-2025集成电路 电磁发射测量 第3部分:辐射发射测量 表面扫描法.pdf
- 《GB/T 44937.3-2025集成电路 电磁发射测量 第3部分:辐射发射测量 表面扫描法》.pdf
- 中国国家标准 GB/T 44937.1-2025集成电路 电磁发射测量 第1部分:通用条件和定义.pdf
- GB/T 44937.1-2025集成电路 电磁发射测量 第1部分:通用条件和定义.pdf
- 《GB/T 44937.1-2025集成电路 电磁发射测量 第1部分:通用条件和定义》.pdf
- 中国国家标准 GB/T 4937.37-2025半导体器件 机械和气候试验方法 第37部分:采用加速度计的板级跌落试验方法.pdf
- 《GB/T 4937.10-2025半导体器件 机械和气候试验方法 第10部分:机械冲击 器件和组件》.pdf
- 中国国家标准 GB/T 44937.2-2025集成电路 电磁发射测量 第2部分:辐射发射测量TEM小室和宽带TEM小室法.pdf
最近下载
- 转运早产儿低体温预防及护理规范- 团体标准解读PPT.pptx
- 教育信息化十四五规划的主要内容.pptx VIP
- SysKeeper-3000电力专用横向安全隔离装置(正向型)操作手册V4.1-20230328(2).pdf
- 2025年内蒙古自治区包头市中考物理试卷含答案.docx VIP
- Yamaha 雅马哈 乐器音响 YDP-165_YDP-145_YDP-S55_YDP-S35 Quick Operation Guide 用户手册.pdf
- 供应链管理专员(某大型央企)面试题题库详解.docx VIP
- 修文县金龙砂石厂扩能、扩界项目环评报告.docx VIP
- 供应链管理专员面试题(某大型央企)题库详解.docx VIP
- 供应链管理总监面试题(某大型央企)题库解析.docx VIP
- 2025年《西学中》考试(考核)试卷及答案.docx VIP
原创力文档

文档评论(0)