IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an
email to Administrator. User accounts are meant only to access repo
and report issues and/or generate pull requests.
This is a purpose-specific Git hosting for
BaseALT
projects. Thank you for your understanding!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
This makes the udev operation completely lockless by storing a
file for every node in /dev/.udevdb/* This solved the problem
with deadlocking concurrent udev processes waiting for each other
to release the file lock under heavy load.
Hi,
Here is a few updates for the udev.rules.gentoo from udev package.
I will summarise it briefly:
1) The last change you did to legacy tty's is wrong.
I say this because:
1a) The original devfs rules had both master and slave in /dev/pty:
nosferatu linux # grep devfs_name drivers/char/pty.c
pty_driver->devfs_name = "pty/m";
pty_slave_driver->devfs_name = "pty/s";
nosferatu linux #
1b) If you refer to '2.6.8.1-mm1 Tty problems?', you will see that
the /dev/tty/ directory our rules create, replaces this symlink:
nosferatu portage # ls -l /dev/tty
crw-rw-rw- 1 root tty 5, 0 Nov 14 17:06 /dev/tty
nosferatu portage #
which is used to determine the controlling tty.
2) Somebody added the /dev/cpu/microcode rule, but it was not run
as there was an older rule before that placing it in /dev/misc (which
is wrong). Just remove the first broken rule
3) Some form/tab cleanups. Reorder rules alphabetically according to
device class to make searching/editing easier.
Here is a revised version of the patch. Again, it modifies the Makefile
to respect the prefix= setting when putting paths to
/etc/udev/{rules.s,permissions.d} into the built /etc/udev/udev.conf
file. It also changes the Makefile to create this file at "make" time,
not "make install" time. This allows for udevdir to be specified at
"make" time (thus putting the correct path into udev.conf), but not
specified at "make install" time (thus allowing the installation to
proceed without trying to use the wrong directory).
Submitted By: Kevin P. Fleming <kpfleming@linuxfromscratch.org>
Date: 2004-09-16
Initial Package Version: 032
Origin: David Jensen
Description: correct udev's Makefile and template config file
to respect the "prefix=" setting supplied when it is built; also
build etc/udev/udev.conf at "make" time, not "make install" time
The attached patch contains a few patches against udev, to remove
use of various XSI:isms and bash:isms, and to change two scripts form
/bin/bash to /bin/sh. None of the bash-scripts in test/ uses any
bash-specific functions as far as I know, but I didn't touch them since
they aren't used runtime.
Rationale:
* Both of the /bin/bash-scripts are totally free from bashisms, hence they
don't need to be /bin/bash; using /bin/sh instead helps (mainly)
embedded-people
* local and source are bash:isms (well, they exist in several other
shells as well, but they aren't part of POSIX or any of its extensions)
* -a in tests is an XSI-extension, not part of strict POSIX, and is
easily replaced by &&
| http://www.opengroup.org/onlinepubs/009695399/utilities/test.html
* Use of fgrep is deprecated in POSIX in favour of grep -F (though fgrep
will remain in use for a long time...)
| http://www.opengroup.org/onlinepubs/009695399/utilities/grep.html
The fgrep-change isn't really necessary, since fgrep can always be
implemented as a shell-script, but the rest of the changes would really
be appreciated.
Here is a small change to the udev man page:
- clarify the use of the NAME{all_partitions} syntax
and add a example to udev.rules.example
- mention the empty NAME field to ignore the device
- prepare a SYMLINK field for the addition of Andrey's
"multiple symlinks" documentation :)
I dualboot between 2.4.x and 2.6.x right now, and although I
want udev to start up when 2.6 is booting, I don't want it to try when
2.4.x is booting.
This is a small patch to not start up udev if sysfs is not
mounted.
Here we change the magic callout part number selector to the new
atribute syntax. The syntax to select the second part of the callout string:
'%2c' is now '%c{2}'
I think it's more clear and we no longer misuse the length argument.
The old syntax is still supported, but we should remove it some
time in the future.
Here we switch the configs and man pages to the new attribute syntax.
Also the 'partition trick' is mentioned in udev.8
I think it's more clear visible now, that inside the brackets are user
supplied values used and not some magic keys handled:
'SYSFS_dev' is now 'SYSFS{dev}'
The old syntax is still supported.
Once again, patch to make logging a config option.
Reason for this (since you asked for it):
- In our setup it is easy (although still annoying) .. just edit the
ebuild, add logging support (or remove it) and rebuild. For say a
binary distro, having the logging is useful for debugging some
times, but its more a once of, or rare thing, as you do not add or
change config files every day. Sure, we can have logging by
default, but many do not want ~300 lines of extra debugging in their
logs is not pleasant, and they will complain. Rebuilding the
package for that binary package (given the users it is targeted to)
is usually not within most users grasp.
I've edited the man page today, so this is alreay included :)
Also a few more trivials:
o added the defaults to udev.conf.in
o removed class_dev from get_default_mode(), to match with Hanna's
o changed size of mode_str to MODE_SIZE
o changed a few char compares from from 0x00 to '\0'
I've attached a patch that adds a few rules to udev.rules.devfs, making it
look a little more like devfs on my system. (I have the sysfs patches from
2.6.1-rc1-mm2) I added rules for oss, misc, floppy, and input devices. The
oss rules look like trouble with a wildcard at the end of each name, but I'm
not sure how I can make it any better.
Devfs has a bunch of other devices in the floppy directory for floppies
formatted in unusual ways, but I don't see them in udev. Not that I ever used
them, since they're usually automatically detected.
I had too much time during the holidays, so I played a bit with udev. The
changes are like last time mostly on the init stuff. I'm sending you this as
a great diff which is just for comments.
What it does:
-fix a typo in Makefile
-use only one "grep -v" instead of many
-don't include BK-Files into release (shrinks the stuff to 30%!)
-add a new init script which is LSB compliant
-add some flags to choose which one to use
-use /etc/udev/udev.conf in Redhat init script as the source for the udev
directory. If this is not done then the init script may create a directory
which udev itself isn't using (I changed /udev to /Udev to avoid collisions
with /usr and ran into this)
-first check for sysfs_dir before creating udev_root (maybe someone else has
already fixed this, I saw this discussion on lkml)
On Wed, Dec 31, 2003 at 11:24:53AM -0800, Greg KH wrote:
> > There should be a possibility to tell udev not to create a device node.
> >
> > device-mapper: Usually set up by libdevmapper (or EVMS tools) which
> > creates the device node on its own under /dev/mapper/<name>.
> >
> > With udev a second device is created named /dev/dm-<minor> which is not
> > really needed.
>
> Good point. Ok, I'll agree with you. Care to make up a patch for this
> kind of feature?
Yes, I can try.
There was no way to tell not to do anything so I created one. Errors
are signalled via negative return values, so I thought that a positive,
non-zero one could mean to ignore the device. I don't like it but
perhaps you have a better solution.
I integrated udev with Fedora Core. The main piece is simply building
/udev on boot, since we don't have an initramfs yet. We should also
clear out /udev on shutdown, for /udev directories mounted on persistent
media.
The attached script goes in /etc/init.d
Then do "chkconfig --add udev"
And the rest is handled automatically. I made it for Fedora but it will
probably work, with little change, on any Linux system.
Right now it only does sysfs-based discovery of block and tty devices,
since those are the only types of devices I have on my system. There is
a TODO in the script where we would add the other device types.