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!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
The troff man pages will still be checked into the tree but the
source is DocBook XML format living in the docs/ directory now.
Start with the easy ones, the main udev page is still left to
rewrite.
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
We will not support any other character encoding than plain ascii
or utf8 for volume labels. All invalid utf8 and non-ascii characters
are substituted for security reasons. No options, no fancy heuristics.
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
Several people complained about the "default" rules and the "default"
setup. Here we start to remove things where we can't hava a "default".
The best examples for rules are in the distro folders, just pick the one
that matches your needs and start from there.
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
Solaris uses volume_id now and they fiddled around with configure scripts
to map the linux kernel int types. Adding the types locally to volume_id
breaks the klibc build, so just switch to these ugly types and forget it. :)
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
This will allow us to have whole blocks of rules to skip
conditionally. The following section creates the node "yes":
GOTO="TEST"
NAME="no"
NAME="no2", LABEL="NO"
NAME="yes", LABEL="TEST"
NAME="no3"
All the rule files can be compiled into a single file,
which can be mapped into the udev process to avoid parsing
the rules with every event.
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
Handle all events with rules. If udev is expected to handle hotplug.d/
the exernal helper must be called.
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
Controls the behavior of the running daemon. Currently only stopping and starting
of the execution queue is supported.
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
SUBSYSTEM=="block", RUN="/sbin/program"
will execute the program only for block device events.
ACTION="remove", SUBSYSTEM=="block", RUN"/sbin/program"
will execute the program, if a block device is removed.
The new libsysfs and klibc don't need that anymore.
Wrap getpwnam(), so we can use the built-in /etc/passwd
parser for statically compiled glibc binaries too.
Move code into a .c-file instead of big inline functions in a header file.
Pass the device name down instead of relying that the node name is equal
to the kernel name.
This cuts the size of the binaries, as only objects that
are actually used are linked into the binary:
45592 -> 43608 udev
4380 -> 4380 udevsend
10380 -> 4652 udevd
34732 -> 33100 udevinfo
45432 -> 37208 udevtest
The slow logging facilites on some systems are a reason for
the reported slowness of udevstart. On one of my boxes udevstart
is down from 9 second to 0.3 seconds.
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.
In the grand tradition of releasing free software projects on my birthday
for the past few years.
And yes, I skipped version 041, call it grumpyness in my old age...
This patch exposes the wait_for_sysfs functions to all possible users,
so we need to maintain only one list of exceptions. The last list is
hereby removed from udev.c.
Hey, we got consistent source filenames today. Let's go ahead :)
I once started this ambitiuos curses gui to edit udev rules files.
udevruler still lays dead around in the tree. I will not finish it
and it is not really useful at his state. If nobody wants to do
something for it, I'm for deleting it.
This patch fixes the reintroduced bug with the
sig_handler(), if we link against a -mregparm=3 compiled
klibc on i386.
It also fixes some compiler warnings about redefined
asmlinkage on some systems.
Also some (broken?) compilers on distros throw out warnings
if asmlinkage is before "static void". This fixes it, too.
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
On Tue, Sep 21, 2004 at 07:17:34PM +0200, Kay Sievers wrote:
> During the integration of HAL into the linux hotplug system, we dicover
> every week a new signaling path that fails cause of the delayed
> population of the sysfs files, which are connected by symlinks and
> appear in something like a random order in userspace.
>
> It's pretty complicated to understand the connection between all these
> files for all the different subsystems with all the exceptions, so most
> of the users simply sleep a few seconds, but that is not acceptable for
> our integration work.
>
> Here I try to get all the special knowledge about that behavior together
> and place that in a simple binary. That program _must_ run first of all
> other hotplug processsing and every later script, udev or HAL all can get
> rid of the wild guesses about the right time sysfs is ready.
>
> It will not only wait for the "dev"-file events we handle with udev, also
> for every /device-device with the corresponding bus link.
>
> It is provided as a patch against the current udev tree and a "install" will
> place the new program in the hotplug.d directory:
>
> [kay@pim ~]$ tree /etc/hotplug.d/
> /etc/hotplug.d/
> `-- default
> |-- 00-wait_for_sysfs.hotplug -> /sbin/wait_for_sysfs
> |-- 10-udev.hotplug -> /sbin/udevsend
> |-- 20-hal.hotplug -> /usr/libexec/hal.hotplug
> |-- default.hotplug
> `-- log.hotplug
>
>
> For now, it logs the result of the waiting to syslog, to catch any
> device, that needs special treatment. All newly discovered delay problems,
> device black/whitelist updates should go into that program and we may remove
> that kind of specialisation from all the other hotplug programs.
>
> Any patches, reports, testing is more than welcome.
>
> Sample debug:
> Sep 21 18:44:07 localhost kernel: usb 3-2: new full speed USB device using address 12
> Sep 21 18:44:07 localhost kernel: hub 3-2:1.0: USB hub found
> Sep 21 18:44:07 localhost kernel: hub 3-2:1.0: 2 ports detected
> Sep 21 18:44:07 localhost 00-wait_for_sysfs.hotplug: result: waiting for sysfs successful '/devices/pci0000:00/0000:00:1d.1/usb3/3-2'
> Sep 21 18:44:07 localhost 00-wait_for_sysfs.hotplug: result: waiting for sysfs successful '/devices/pci0000:00/0000:00:1d.1/usb3/3-2/3-2:1.0'
> Sep 21 18:44:08 localhost kernel: usb 3-2.1: new full speed USB device using address 13
> Sep 21 18:44:08 localhost 00-wait_for_sysfs.hotplug: result: waiting for sysfs successful '/class/usb/lp0'
> Sep 21 18:44:08 localhost kernel: drivers/usb/class/usblp.c: usblp0: USB Bidirectional printer dev 13 if 0 alt 1 proto 2 vid 0x067B pid 0x2305
> Sep 21 18:44:08 localhost 00-wait_for_sysfs.hotplug: result: waiting for sysfs successful '/devices/pci0000:00/0000:00:1d.1/usb3/3-2/3-2.1/3-2.1:1.0'
> Sep 21 18:44:08 localhost 00-wait_for_sysfs.hotplug: result: waiting for sysfs successful '/devices/pci0000:00/0000:00:1d.1/usb3/3-2/3-2.1'
> Sep 21 18:44:08 localhost udev: configured rule in '/etc/udev/rules.d/50-udev.rules' at line 29 applied, 'lp0' becomes 'usb/%k'
> Sep 21 18:44:08 localhost udev: creating device node '/udev/usb/lp0'
> Sep 21 18:44:09 localhost kernel: usb 3-2.2: new full speed USB device using address 14
> Sep 21 18:44:09 localhost kernel: pl2303 3-2.2:1.0: PL-2303 converter detected
> Sep 21 18:44:09 localhost kernel: usb 3-2.2: PL-2303 converter now attached to ttyUSB0
> Sep 21 18:44:09 localhost 00-wait_for_sysfs.hotplug: result: waiting for sysfs successful '/devices/pci0000:00/0000:00:1d.1/usb3/3-2/3-2.2'
> Sep 21 18:44:09 localhost 00-wait_for_sysfs.hotplug: result: waiting for sysfs successful '/devices/pci0000:00/0000:00:1d.1/usb3/3-2/3-2.2/3-2.2:1.0'
> Sep 21 18:44:09 localhost 00-wait_for_sysfs.hotplug: result: waiting for sysfs successful '/devices/pci0000:00/0000:00:1d.1/usb3/3-2/3-2.2/3-2.2:1.0/ttyUSB0'
> Sep 21 18:44:09 localhost 00-wait_for_sysfs.hotplug: result: waiting for sysfs successful '/class/tty/ttyUSB0'
> Sep 21 18:44:09 localhost udev: creating device node '/udev/ttyUSB0'
New version with more devices excluded from /device-link saerch and
a better maching for device names.
We ran into problems with all the /etc/hotplug.d/ scripts that sleep for
the sysfs files or for other reasons. Anyway, it takes much too much time
before udev is executed.
HAL has its own notifier in /etc/hotplug.d/ and also waits for the
dev.d/events with the same SEQNUM. Sometimes it take 25 seconds between
these two events, cause the other scripts are sleeping too much :)
Attached is a patch that installs the udevsend symlink as
10-udev.hotplug instead of udev.hotplug, to be executed earlier.
[kay@pim udev.kay]$ tree /etc/hotplug.d/
/etc/hotplug.d/
`-- default
|-- 10-udev.hotplug -> /sbin/udevsend
|-- 20-hal.hotplug -> /usr/libexec/hal.hotplug
`-- default.hotplug
Hi,
The following patch makes udev/udevstart be a common binary. First,
doing this grows udev by a total of 1.8kB (ppc32, stripped) whereas
udevstart by itself is 6.4kB. I know you mentioned being able to
replace udevstart with a script, but at 1.8kB I don't think it'll be
easy to beat this with size there. Next, the following are by-eye
timings of before, after, and with devfs on a slow, but still usable
embedded platform (config stripped down to more-or-less bare for
ramdisk):
-- Embedded Planet RPX LITE, 64Mhz MPC 823e --
devfs : 15.333s, 15.253s, 14.988s (15.191s avg)
udev-pristine : 18.675s, 18.079s, 18.418s (18.390s avg)
udev-multi : 14.587s, 14.747s, 14.868s (14.734s avg)
The patch ends up being rather large to add this, as in doing so I ended
up making all refs (that I hit..) to devpath/subsystem be marked as
'const'.
Signed-off-by: Tom Rini <trini@kernel.crashing.org>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
The following patch adds 'asmlinkage' defines to udev, to kill off 2
warnings on !i386.
Signed-off-by: Tom Rini <trini@kernel.crashing.org>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
Here we catch up, after the default config changes.
o the man page is updated to reflect the new default config
o /etc/udev/rules.d/ + permissions.d/ dirs are created now
o udev.rules is installed in /etc/udev/rules.d/50-udev.rules
so the user can easily order the files by prepending a number.
(RedHat has the same name in the last rpm.)
o defined directory names in the Makefile are all without slashes now,
not the first half with and the remaining without.
o all binaries are uninstalled now
o leading slashes in config values are now removed or prepended while the
config is parsed, so we are more robust if the usere changes something.
o replaced the macros from udev_config.c with real code, cause we can
skip if the value matches and not useless iterate over the remaining
fields.
o config parsing errors are logged with info() now, fixes the bug where
we report a error with debug_parse(), even when there isn't one
here is a patch on top of your nice improvements.
I fixed the whitespace and it hopefully fixes the stupid timestamp bug in
udevd. Some stupid OS sets the hwclock to localtime and linux changes it
to UTC while starting. If any events are pending they may be delayed by
the users time distance from UTC :) So we use the uptime seconds now.
On Mon, Mar 15, 2004 at 09:28:17PM +0100, Kay Sievers wrote:
> Here is a first simple and pretty stupid try to make a simple tool for
> composing of a udev rule.
>
> It reads the udevdb to get all currently handled devices and presents a
> list, where you can choose the device to compose the rule for.
>
> The composed rule is just printed out in a window, nothing else by now.
>
> Do we want something like this?
> Nevermind, I always wanted to know, how this newt thing works :)
Here is the next step, I still can't sleep and there are to many patches
pending to make something useful :)
Cause nobody wanted to play with me, I've made a screenshot.
The device list is sorted in alphabetical order now and if there are only
a few recently discovered devices, they are placed on top of the list.
For those who want to have a look:
http://vrfy.org/projects/udev/udevruler.png
The patch applies on top of today's mmap() patch. The db format is
changed to have the file and line number of the applied rule. So it
should be easy to edit the matching rule with this beast. It compiles
with "make all udevruler".
Here we replace the various fgets() with a mmap() call for the config
file reading, due to the reported performance problems with klibc.
Thanks to Patrick's testing, it makes a very small, close to nothing
speed gain for libc users, but a 6 times speed increase for klibc users
with a 1000 line config file.
I've created a udev_lib.[hc] for this and also moved all the generic
stuff from udev.h in there and uninlined the functions.