Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
|
|
Patch from Jordan <lx_xero@comcast.net>
|
|
|
|
On Thu, Mar 25, 2004 at 02:52:13AM +0100, Kay Sievers wrote:
> Please have look if it still works for you, I only did a very quick
> test.
Here is a unified version, with all the functions moved to udev_lib.c.
We have a generic function now, to call a given fnct(char *) for every
file ending with a specific suffix, sorted in lexical order. We use it
to execute the dev.d/ files and read our rules.d/ files. The binary
should be a bit smaller now.
I've also changed it, to not do the dev.d/ exec for net devices.
|
|
Rules with NAME{all_partitions}= are now applied only to the parent of a
block device. We no longer need to exclude the partitions or sg* devices.
|
|
The file may not exist and errors would be spewed on the console.
|
|
|
|
|
|
|
|
directory as documented.
|
|
Hmm, Arndt Bergmann sent a patch like this one a few weeks ago and
I want to bring the question back, if we want to handle net device
naming with udev.
With this patch it is actually possible to specify something like this
in udev.rules:
KERNEL="dummy*", SYSFS{address}="00:00:00:00:00:00", SYSFS{features}="0x0", NAME="blind%n"
KERNEL="eth*", SYSFS{address}="00:0d:60:77:30:91", NAME="private"
and you will get:
[root@pim udev.kay]# cat /proc/net/dev
Inter-| Receive | Transmit
face |bytes packets errs drop fifo frame compressed multicast|bytes packets errs drop fifo colls carrier compressed
lo: 1500 30 0 0 0 0 0 0 1500 30 0 0 0 0 0 0
private: 278393 1114 0 0 0 0 0 0 153204 1468 0 0 0 0 0 0
sit0: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
blind0: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
The udevinfo program is also working:
[root@pim udev.kay]# ./udevinfo -a -p /sys/class/net/private
looking at class device '/sys/class/net/private':
SYSFS{addr_len}="6"
SYSFS{address}="00:0d:60:77:30:91"
SYSFS{broadcast}="ff:ff:ff:ff:ff:ff"
SYSFS{features}="0x3a9"
SYSFS{flags}="0x1003"
SYSFS{ifindex}="2"
SYSFS{iflink}="2"
SYSFS{mtu}="1500"
SYSFS{tx_queue_len}="1000"
SYSFS{type}="1"
follow the class device's "device"
looking at the device chain at '/sys/devices/pci0000:00/0000:00:1e.0/0000:02:01.0':
BUS="pci"
ID="0000:02:01.0"
SYSFS{class}="0x020000"
SYSFS{detach_state}="0"
SYSFS{device}="0x101e"
SYSFS{irq}="11"
SYSFS{subsystem_device}="0x0549"
SYSFS{subsystem_vendor}="0x1014"
SYSFS{vendor}="0x8086"
The matching device will be renamed to the given name. The device name
will not be put into the udev database, cause the kernel renames the
device and the sysfs name disappears.
I like it, cause it plugs in nicely. We have all the naming features
and sysfs queries and walks inside of udev. The sysfs timing races
are already solved and the management tools are working for net devices
too. nameif can only match the MAC address now. udev can match any sysfs
value of the device tree the net device is connected to.
But right, net devices do not have device nodes :)
|
|
|
|
|
|
longer present.
|
|
|
|
|
|
|
|
Not needed now that it's in extras.
|
|
Should build now, but might have linking problems.
|
|
|
|
|
|
Will not work, need to finish working on this on a system with selinux installed...
|
|
|
|
Will not work, need to finish working on this on a system with dbus installed...
|
|
|
|
there.
|
|
|
|
|
|
I think this is what you want for udevinfo. Patched against the latest BK
tree. I tested it and it seemed to work.
One other question, shouldn't udevinfo.c:print_all_attributes() check to
make sure attr->method is SYSFS_METHOD_SHOW along with checking to see
if attr->value != NULL or doesn't that matter?
Here's the libsysfs fix for print_device_chain():
|
|
Patch from Andrey, which restores the ability to use RESULT values in a
"symlink only" rule. We need to call apply_format() directly after
the matching rule, otherwise the RESULT value may be lost.
|
|
Is there any reason to parse the rules for a remove event?
Without it, our test script needs only 2.1 seconds instead of 2.5,
so we have 19 percent more time for testing now :)
|
|
mknod gets an uninitialized variable, which leads to interesting file
modes. the bug is in namedev, devices with no match must not use the
uninitialized stuff were dev points to.
|
|
|
|
bah, this took me forever to figure out why I couldn't build with klibc on
on box...
|
|
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".
|
|
Thanks to bert hubert <ahu@ds9a.nl> for the text.
|
|
Hi, Greg. Appended is scsi-devfs.sh, a script for udev to implement
devfs-style names for SCSI hard discs, CD-ROM's and generic devices.
This has been tested with both hard discs and CD-ROM's. The SCSI
generic support should be OK for when there is sysfs/udev support for
SCSI generic devices. SCSI tapes are not yet implemented because I
don't have one to test with.
In addition, this script supports physical names, based on PCI bus
location, both longhand (/udev/bus/pci/...) and shorthand
(/udev/sd/pci/*).
|
|
<rgooch@ras.ucalgary.ca>
|
|
|
|
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.
|
|
Fix minor man page typo's.
|
|
Here are the missing pieces for udevtest. A simple man page is added,
the blacklist is removed, cause it can't work without having a subsystem.
The Makefile removes all manpages now with a uninstall and installs
udevtest in /usr/bin/.
Any old version from /sbin/ should be deleted by hand.
The only expected argument is the sysfs devpath, here I changed it to be
more tolerant to the input. The path may now be specified with or
without a leading slash and optionally with the /sys moutpoint prepended.
I hope this will end the confusion about the use of this program :)
|
|
|
|
klibc has a target make spotless, this patch makes it possible to clean
the whole udev tree and start from scratch.
|
|
|
|
Here is a small name change, so all expected values are named exp_*
|
|
|