Age | Commit message (Collapse) | Author |
|
|
|
|
|
Cset exclude: greg@kroah.com|ChangeSet|20041007204001|14326
|
|
|
|
|
|
do not expect device symlinks for
This makes it a lot easier to test for these devices, otherwise the list would have gotten very large
|
|
debug messages.
|
|
|
|
|
|
Here is the file to wait for the bluetooth class, as it is not a "dev"
file. udev waits for 10 seconds here too.
|
|
|
|
Here is the correction for the dev.d/ scripts too. We should pass
the right argv[0] here too. A script may depend on the right value, as
udev does with udev/udevstart.
Here is the old version:
[pid 4692] execve("/etc/dev.d/default/log.dev", ["./udev", "block"], [/* 41 vars */]) = 0
this the new one:
[pid 9832] execve("/etc/dev.d/default/log.dev", ["/etc/dev.d/default/log.dev", "block"], [/* 41 vars */]) = 0
|
|
|
|
> Sorry, I left my debug code in.
Oops, just realized it now. You've applied a older version and not the
latest. Here is a new patch to catch up.
|
|
also clean out some stuff in the makefile that was never getting used.
|
|
when udevstart was running we didn't set the environment and the
subsystem argument for the callouts the dev.d/ scripts.
Here is a fix, that sets that with every udevstart iteration, corrects
argv[0] to be the basename() only not the whole path and adds a test
for invoking callouts without arguments.
|
|
This is now a standalone package.
|
|
Here is an update to the latest volume_id which fixes a few bugs with
FAT volumes.
|
|
selinux wants a clean fd set, so better close all open fds
|
|
posted by Steve Grubb on https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=130351
|
|
posted by Steve Grubb on https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=130351
|
|
|
|
see what is going on.
|
|
and I told them to follow the proper coding style... bleah...
|
|
Daniel Walsh's working selinux patch
|
|
for "make install"
|
|
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.
|
|
Here's a patch updating udev's copy of scsi_id to version 0.6.
|
|
Based on a patch from Kay Sievers <kay.sievers@vrfy.org>
|
|
|
|
|
|
Let's try it another way:
We define BLKGETSIZE64 in udev-volume_id.c now, cause including <fs.h>
does also not work with klibc. This hopefully fixes your compile problem
too.
Also included is an update to udev_volume_id with the latest fixes for
volume_id. It adds a simple logging file to map the debug function, that
we can use exactly the same files in HAL and udev.
|
|
The kernel will use a u64 for the sequence number, so we want the same.
|
|
On Fri, Sep 10, 2004 at 01:09:07PM -0700, Greg KH wrote:
> On Tue, Sep 07, 2004 at 01:19:34PM +0200, David Zeuthen wrote:
> >
> > KERNEL="sr*", NAME="%k", SYMLINK="cdrom%e"
> > KERNEL="scd*", NAME="%k", SYMLINK="cdrom%e"
> > KERNEL="pcd*", NAME="%k", SYMLINK="cdrom%e"
> > KERNEL="hd[a-z]", PROGRAM="/bin/cat /proc/ide/%k/media", RESULT="cdrom", NAME="\%k", SYMLINK="cdrom%e"
> > KERNEL="fd[0-9]", NAME="%k", SYMLINK="floppy%e"
> > KERNEL="hd[a-z]", PROGRAM="/bin/cat /proc/ide/%k/media", RESULT="floppy", NAME=\"%k", SYMLINK="floppy%e"
> >
> > New patch is attached.
>
> Nice, I've applied this.
>
> How about sending a patch for the test/udev-test.pl script that adds a
> test for this new paramater, so we make sure to not break it in the
> future.
Here are the tests for the enumeration character %e. I've added a option
string to be able to do a whole sequence of tests without node removal,
so we can skip the "remove" event and get an increasing number to append
to the name. After the sequence test the whole directory is cleaned for
the next tests.
|
|
On Tue, Sep 14, 2004 at 02:53:12PM +0200, Loleslaw wrote:
> Hi,
> Since I started using udev-031 on my gentoo udevstart would just segfault
> (udev-030 worked). As it turned out I had a file in /etc/udev/permissions.d
> with a single space in one line. I've cleaned the file and it works all
> right, but I thought you could be interested.
> I've traced it to function namedev_init_permissions in namedev_parse.c
> I don't know C well enough to suggest a patch.
Yeah, thanks for pointing that out. It only happens if the file ends with
whitespace-only lines. Here is a fix and a test for udev-test.pl to
cover that case.
|
|
|
|
There is a bug parsing PROGRAMs after apostrophes. Try PROGRAM="/bin/echo 'test test".
|
|
Fix a stupid logic bug, I introduced with the udev.c simplification. We
want to look at class and block devices only.
|
|
On Mon, 2004-09-13 at 01:56 +0200, Marco d'Itri wrote:
> Starting from udev 031, the %-arguments passed to PROGRAMs are not
> correct when the new udevstart code is being used.
>
> KERNEL="event[0-9]*", NAME="input/%k", PROGRAM="/etc/udev/inputdev.sh %k %n %M %m", RESULT="inputdev", MODE="0664", GROUP="video"
>
> generates this log (just echo $*):
>
> event0 0 13 64
> event0 0 13 64
> event0 0 13 64
>
> while the correct log (generated using the old shell script instead of
> udevstart) would be:
>
> event0 0 13 64
> event1 1 13 65
> event2 2 13 66
Yes, I can simulate this, please try the attached patch. I expect, that
it fixes it, cause we better not mangle the parsed config while matching
the rules.
|
|
|
|
|
|
devices
Seems some programs really want /dev/null to work properly :)
|
|
|
|
On Tue, Sep 07, 2004 at 12:46:43PM +0200, Kay Sievers wrote:
> On Mon, 2004-09-06 at 20:18 -0700, Tom Rini wrote:
> > I noticed somewhat recently that my enet devices weren't being renamed
> > on boot anymore. I don't quite know when this got broken (or rather, if
> > it was supposed to be working. I swear it worked for me once..), but
> > the following seems to do it.
>
> I think it never worked in the udevstart case. It worked only with the
> hotplug-event-udev, I expect.
>
> > In udev_scan_class(), look for not just
> > %s/%s/dev (which everything with a dev node has), but %s/%s/dev* (both
> > of my enet devices, sis900 & 3c59x only have device) and if that
> > exists, pass this along to udev.
>
> Yeah, network devices don't have a devnode and therefore no "dev", but
> they are all in /sys/class/net/. We may just test if we are there
> instead of the "device" match.
How about something like this. It adds all the net devices without
looking at the attributes and keeps the remaining logic like it is.
It also removes certain levels of indirection and much simplifies the
udevstart process. We surely don't need to open and close the udevdb
for every node while iterating over the list. (We are about 5% faster on
my box)
It's not well tested, so it would be nice if someone can have a look
at it, before a broken udevstart renders any system unbootable.
|
|
On Mon, 2004-09-06 at 17:45 +0200, Kay Sievers wrote:
> On Mon, 2004-09-06 at 16:46 +0200, David Zeuthen wrote:
>
> Nice, I like it. It's a easy way to group device nodes of the same type,
> but coming from different kernel subsystems.
>
That's a good way of putting it, yeah.
> > Here's a patch against udev-030 that can help create compatibility
> > symlinks like /dev/cdrom, /dev/cdrom1 etc. The patch introduces a new
> > substitution type %C (for Compatibility) that can be used as follows
>
> I suggest using %e for enumeration here, cause "compatibility" can
> easily be misunderstood.
>
Good point, I've changed that.
> And we need a few lines added to the man page at udev.8.in :)
>
Done. I've also added an example.
Also, Kay pointed out offlist that the rules can be written to not
require a shell script; this actually works
KERNEL="sr*", NAME="%k", SYMLINK="cdrom%e"
KERNEL="scd*", NAME="%k", SYMLINK="cdrom%e"
KERNEL="pcd*", NAME="%k", SYMLINK="cdrom%e"
KERNEL="hd[a-z]", PROGRAM="/bin/cat /proc/ide/%k/media", RESULT="cdrom", NAME="\%k", SYMLINK="cdrom%e"
KERNEL="fd[0-9]", NAME="%k", SYMLINK="floppy%e"
KERNEL="hd[a-z]", PROGRAM="/bin/cat /proc/ide/%k/media", RESULT="floppy", NAME=\"%k", SYMLINK="floppy%e"
New patch is attached.
David
|
|
Hi Kay,
On 23:12 Sat 04 Sep , Kay Sievers wrote:
> Cool, a real bug :)
> Thanks, for the patch. I think it would be better to skip lenghth exceeding
> lines instead of cutting it and continue. While looking at it I restructured
> the buffer reading logic a bit and fixed another stupid bug.
Thanks for the cleanup.
You may have overlooked the fix for udev_config.c(parsing udev.conf) in
your patch. So, I've adapted the fixes you applied to namedev_parse.c
to this file also.
Also, while 'eating' the whitespace the 'count' doesn't get decremented.
This leads strncpy to copy the number of whitespace minus 1 characters
from the next line. Minus 1 because it copies '\n' from the current
line.
while (isspace(bufline[0])) {
bufline++;
+ count--;
}
.
.
.
strncpy(line, bufline, count);
Included patch(against udev-030) contains the above fixes as well as
your fixes.
Signed-off-by: Arun Bhanu <arun@codemovers.org>
|
|
make -j doesnt work with current udev.
|