/[gentoo]/xml/htdocs/doc/en/udev-guide.xml
Gentoo

Diff of /xml/htdocs/doc/en/udev-guide.xml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.2 Revision 1.3
11This document explains what udev is and how you can use udev to fit your needs. 11This document explains what udev is and how you can use udev to fit your needs.
12</abstract> 12</abstract>
13 13
14<license/> 14<license/>
15 15
16<version>0.2</version> 16<version>0.3</version>
17<date>February 29, 2003</date> 17<date>March 1, 2003</date>
18 18
19<chapter> 19<chapter>
20<title>What is udev?</title> 20<title>What is udev?</title>
21<section> 21<section>
22<title>The /dev Directory</title> 22<title>The /dev Directory</title>
23<body> 23<body>
24 24
25<p> 25<p>
26When Linux-users talk about the hardware on their system in the vicinity of 26When Linux-users talk about the hardware on their system in the vicinity of
27people that believe Linux is some sort of virus or brand of coffee, the use of 27people who believe Linux is some sort of virus or brand of coffee, the use of
28"slash dev slash foo" will return a strange look for sure. But for the fortunate 28"slash dev slash foo" will return a strange look for sure. But for the fortunate
29user (and that includes you) using <path>/dev/hda1</path> is just a fast way of 29user (and that includes you) using <path>/dev/hda1</path> is just a fast way of
30explaining that we are talking about the primary master IDE, first partition. Or 30explaining that we are talking about the primary master IDE, first partition. Or
31aren't we? 31aren't we?
32</p> 32</p>
38master IDE disk is referred to as <path>/dev/hda</path>. You might not see it 38master IDE disk is referred to as <path>/dev/hda</path>. You might not see it
39this way, but this is a flaw by design. 39this way, but this is a flaw by design.
40</p> 40</p>
41 41
42<p> 42<p>
43Think hotpluggable devices like USB, IEEE1394, hot-swappable PCI, ... What is 43Think about hotpluggable devices like USB, IEEE1394, hot-swappable PCI, ... What
44the first device? And for how long? What will the other devices be named to when 44is the first device? And for how long? What will the other devices be named when
45the first one disappears? How will that affect ongoing transactions? Wouldn't it 45the first one disappears? How will that affect ongoing transactions? Wouldn't it
46be fun that a printing job is suddenly moved from your supernew laserprinter to 46be fun that a printing job is suddenly moved from your supernew laserprinter to
47your almost-dead matrix printer because your mom decided to pull the plug of the 47your almost-dead matrix printer because your mom decided to pull the plug of the
48inkjet which happened to be the first printer? 48inkjet which happened to be the first printer?
49</p> 49</p>
50 50
51<p> 51<p>
52Enter <e>udev</e>. The goals of the udev project are both interesting and 52Enter <e>udev</e>. The goals of the udev project are both interesting and
53needed: 53needed:
54</p> 54</p>
55 55
56<ul> 56<ul>
57 <li>Run in userspace</li> 57 <li>Runs in userspace</li>
58 <li>Dynamically create/remove device files</li> 58 <li>Dynamically creates/removes device files</li>
59 <li>Provide consistent naming</li> 59 <li>Provides consistent naming</li>
60 <li>Provide a user-space API</li> 60 <li>Provides a user-space API</li>
61</ul> 61</ul>
62 62
63<p> 63<p>
64To provide these features, udev is developed in three separate projects: 64To provide these features, udev is developed in three separate projects:
65<e>namedev</e>, <e>libsysfs</e> and, of course, <e>udev</e>. 65<e>namedev</e>, <e>libsysfs</e> and, of course, <e>udev</e>.
78that udev can use. 78that udev can use.
79</p> 79</p>
80 80
81<p> 81<p>
82Currently only a single naming scheme is provided by namedev; the one provided 82Currently only a single naming scheme is provided by namedev; the one provided
83by LANANA, used by the majority of Linux systems currently and therefor very 83by LANANA, used by the majority of Linux systems currently and therefore very
84suitable for the majority of Linux users. 84suitable for the majority of Linux users.
85</p> 85</p>
86 86
87<p> 87<p>
88Namedev uses a 5-step procedure to find out the name of a given device. If the 88Namedev uses a 5-step procedure to find out the name of a given device. If the
116</p> 116</p>
117 117
118<p> 118<p>
119Likewise the <e>bus topology</e> is a rather static way of defining devices as 119Likewise the <e>bus topology</e> is a rather static way of defining devices as
120long as the user doesn't switch devices. When the position of the device matches 120long as the user doesn't switch devices. When the position of the device matches
121a given setting provided by the user, the accompagnying name is used. 121a given setting provided by the user, the accompanying name is used.
122</p> 122</p>
123 123
124<p> 124<p>
125The fourth step, <e>statically given name</e>, is a simple string replacement. 125The fourth step, <e>statically given name</e>, is a simple string replacement.
126When the kernel name (the default name) matches a given replacement string, the 126When the kernel name (the default name) matches a given replacement string, the
218<body> 218<body>
219 219
220<p> 220<p>
221If you're interested in the udev-tweaks Gentoo added to make your life 221If you're interested in the udev-tweaks Gentoo added to make your life
222comfortable, then read no more. You're all set. The Gentoo init scripts won't 222comfortable, then read no more. You're all set. The Gentoo init scripts won't
223run the devfsd daemon and deactivate devfs when you boot up. 223run the devfsd daemon and will deactivate devfs when you boot up.
224</p> 224</p>
225 225
226<p> 226<p>
227But if you are a die-hard and want to run a udev-only, no-tweaked system as is 227But if you are a die-hard and want to run a udev-only, no-tweaked system as is
228intended by the udev development (including the difficulties of missing device 228intended by the udev development (including the difficulties of missing device

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

  ViewVC Help
Powered by ViewVC 1.1.20