Gentoo Archives: gentoo-dev

From: Greg KH <gregkh@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] devfs is dead, let's move on
Date: Fri, 08 Jul 2005 17:57:59
Message-Id: 20050708171530.GE29606@kroah.com
In Reply to: Re: [gentoo-dev] devfs is dead, let's move on by Georgi Georgiev
1 On Fri, Jul 08, 2005 at 02:39:51AM +0900, Georgi Georgiev wrote:
2 > maillog: 06/07/2005-15:46:51(-0700): Greg KH types
3 > > Ok, now that devfs is removed from the 2.6 kernel tree[1], I think it's
4 > > time to start to revisit some of the /dev naming rules that we currently
5 > > are living with[2].
6 > >
7 > > To start with, the 061 version of udev offers a big memory savings if
8 > > you use the "default" kernel name of a device[3]. If you do that, it does
9 > > not create a file in its database in /dev/.udevdb/
10 >
11 > Ah, that will break /etc/init.d/halt.sh
12 >
13 > Particularly the stuff around here:
14 >
15 > ebegin "Saving device nodes"
16 > ...
17 > cd /dev
18 > # Find all devices
19 > find . -xdev -type b -or -type c -or -type l | cut -d/ -f2- > \
20 > "${devices_real}"
21 > # Figure out what udev created
22 > eval $(grep '^[[:space:]]*udev_db=' /etc/udev/udev.conf)
23 > if [[ -d ${udev_db} ]]; then
24 > # New udev_db is clear text ...
25 > udevinfo=$(cat "${udev_db}"/*)
26 > else
27 > # Old one is not ...
28 > udevinfo=$(udevinfo -d)
29 > fi
30 > # This basically strips 'S:' and 'N:' from the db output, and then
31 > # print all the nodes/symlinks udev created ...
32 > ...
33 >
34 > The script will be unable to figure out what device is being handled by
35 > udev, and what is not.
36
37 Ugh, why do people care about tarballs of device nodes... :)
38
39 Anyway, yes, this will break that, but only in the way that it will save
40 more device nodes than it needed to, right? Which isn't really a bad
41 thing, as stuff will still work properly. But it's not the nicest.
42
43 Also, mind if I move this stuff out into the udev package itself? That
44 will let me keep it up to date with any udev changes (I wasn't even
45 aware that this checked for different versions of udev database info)
46 much easier.
47
48 thanks,
49
50 greg k-h
51 --
52 gentoo-dev@g.o mailing list