Chinaunix首页 | 论坛 | 博客
  • 博客访问: 243031
  • 博文数量: 137
  • 博客积分: 5005
  • 博客等级: 上校
  • 技术积分: 1360
  • 用 户 组: 普通用户
  • 注册时间: 2005-03-25 09:21
个人简介

每天进步一点点

文章分类

全部博文(137)

文章存档

2016年(1)

2013年(2)

2012年(30)

2011年(42)

2006年(27)

2005年(35)

分类: LINUX

2005-04-11 09:51:23

This document tries to reveal the secrets of udev and how it works on Fedora.

本文解释为什么fedora下挂载光盘要用 mount /dev/hdc /media/cdrecorder

udev provides a dynamic device directory containing only the files for actually present devices. It creates or removes device node files usually located in the /dev directory, or it renames network interfaces.

As part of the hotplug subsystem, udev is executed if a kernel device is added or removed from the system. On device creation, udev reads the sysfs directory of the given device to collect device attributes like label, serial number or bus device number. These attributes may be used as keys to determine a unique name for the device. udev maintains a database for devices present on the system. On device removal, udev queries its database for the name of the device file to be deleted.

udev gets called by hotplug, if a module is loaded, and a device is added or removed. udev looks in /sys, if the driver provides a "dev" file, which contains the major and minor number for a device node to communicate with the driver. After looking in the udev rules (/etc/udev/rules.d), which specify the device node filename and symlinks, a device node is created in /dev with the permissions, which are specified in /etc/udev/permissions.d.

But I really want my device node!

Put them in /etc/udev/devices/ and they will get copied to /dev. , if you think that should be done per default.

可以理解为什么在fedora下 mount光盘要用 /dev/hdc

阅读(1985) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~