summaryrefslogtreecommitdiff
path: root/udev_lib.h
AgeCommit message (Collapse)Author
2005-04-26[PATCH] udev default config layout changeskay.sievers@vrfy.org
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
2005-04-26[PATCH] DEVNODE -> DEVNAME transition fixessjoerd@spring.luon.net
It seems that the transition from DEVNODE to DEVNAME wasn't done everywhere. This broke udev_dbus for me. Attached patch does the transition in the places it wasn't done yet.
2005-04-26[PATCH] dev_d.c file sorting and cleanupkay.sievers@vrfy.org
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.
2005-04-26[PATCH] hmm, handle net devices with udev?kay.sievers@vrfy.org
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 :)
2005-04-26[PATCH] add get_devnode() helper to udev_lib for udev_dbus programgreg@kroah.com
2005-04-26[PATCH] replace fgets() with mmap() and introduce udev_lib.[hc]kay.sievers@vrfy.org
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.