Commit graph

39 commits

Author SHA1 Message Date
Kay Sievers 20bee04c19 libudev: udev_device_get_sysattr_list_entry() update 2011-03-04 23:00:52 +01:00
Thomas Egerer f180ad259f libudev: allow to get list of all available sysfs attrs for a device
Signed-off-by: Thomas Egerer <thomas.egerer@secunet.com>
2011-03-04 21:51:03 +01:00
Kay Sievers 9c6a11b1c6 libudev: record and export "age" of device record 2010-12-15 08:58:46 +01:00
Kay Sievers 48a0170b11 libudev: enumerate - allow to filter-out not-already-initialized devices 2010-12-14 14:18:32 +01:00
Kay Sievers ff0e1f4e5d check ifindex > 0 instead of subsystem == "net" 2010-12-14 11:27:02 +01:00
Kay Sievers cad40a5fe7 udevd: switch to common id_filename functions 2010-12-12 20:07:15 +01:00
Kay Sievers 24d1076696 udevd: simplify udev database and fix DEVNAME handling 2010-12-11 14:00:46 +01:00
Kay Sievers 4281da1fa6 udevd: use dev_t or netif ifindex as database key
We need to preserve the database of network interfaces while we
rename them. Use the kernel's numbers wherever possible, instead
of the device names.

Fix wrong database filenames which contain a '/', translated
from '!' in the kernel name.

Fix segfault for kobject pathes where the subsystem can not be
determined from sysfs.
2010-12-10 01:18:15 +01:00
Kay Sievers cdb1d7608a libudev: return kernel provided devnode when asked before we handled any rules 2010-10-22 13:56:16 +02:00
Kay Sievers fc416258f3 udevd: do not wrongly delay events for devices with swapped names
Renaming network devices might delay events for the other device, which has
the same devpath in the meantime as the original event. Causing a delay until
the timout of the event is reached.

Look at the ifindex/devnum of the devices to check if they are really
the same devices.
2010-10-13 13:08:29 +02:00
Kay Sievers 0c5c48040a libudev: add O_CLOEXEC 2010-05-14 14:52:18 +02:00
Kay Sievers f712894dd4 libudev: add documentation for recently added functions 2010-05-07 23:04:42 +02:00
Kay Sievers 65f099c721 libudev: accept NULL in udev_device_get_tags_list_entry() 2010-04-23 09:22:42 +02:00
Kay Sievers bfd88b1d7b fix logic on-demand loading logic for db and uevent 2010-04-22 18:50:43 +02:00
Kay Sievers 28460195c2 add TAG= to improve event filtering and device enumeration 2010-04-22 18:12:36 +02:00
Kay Sievers 60067cc75a more readlink buffer size handling 2010-04-21 14:44:33 +02:00
Kay Sievers a89d342dfb remove "ignore_remove" option 2010-04-13 12:45:38 +02:00
Kay Sievers 1f084fe581 remove "all_partitions" option
We can not predict the major/minor of non-existing devices:
  $ grep . /sys/class/block/sd*/dev
  /sys/class/block/sda1/dev:259:524288
  /sys/class/block/sda2/dev:259:262144
  /sys/class/block/sda3/dev:259:786432
  /sys/class/block/sda4/dev:259:131072
  /sys/class/block/sda/dev:259:0
  /sys/class/block/sdb/dev:259:655360
  /sys/class/block/sdc/dev:259:393216

If this functionality is still needed for some broken hardware, it needs to be
solved with a tool not part of the udev package. Because such option is unreliable
and unsafe to use.
2010-04-13 08:52:48 +02:00
Kay Sievers dbba7e4029 libudev: update documentation 2010-03-25 16:45:48 +01:00
Kay Sievers fc8d61c53d libudev: add udev_device_new_from_environment() 2010-03-17 17:42:35 +01:00
Kay Sievers fbb31cd6e1 libbudev-private: rename udev_list_entry_get_flag() 2010-03-10 14:52:42 +01:00
David Zeuthen 3a19299202 Use UTIL_LINE_SIZE, not UTIL_PATH_SIZE to truncate properties
Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-03-02 17:07:14 -05:00
David Zeuthen ecd42de2c5 Decrease buffer size when advancing past NUL byte
Otherwise we'll overflow the buffer if space is tight. Also add a comment explaining this.

Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-03-02 17:06:33 -05:00
Kay Sievers 58b533f417 remove remaining support for CONFIG_SYSFS_DEPRECATED 2009-12-24 22:10:40 +01:00
Kay Sievers 3c1898863f remove remaining support for CONFIG_SYSFS_DEPRECATED 2009-12-15 16:14:14 +01:00
Kay Sievers 79ef2e97d9 libudev: doc - use #NULL 2009-12-03 13:31:27 +01:00
Martin Pitt 54d4f54e85 udev_device_get_parent_with_subsystem_devtype(): Clarify documentation
devtype can be NULL, in which case it is ignored for matching.
2009-12-03 13:25:19 +01:00
Kay Sievers 6c29f2b942 simplify "symlink name stack"
With well defined and kernel-supplied node names, we no longer need
to support a possible stack of conflicting symlinks and node names.
Only symlinks with identical names can be claimed by multiple devices.

This shrinks the former /dev/.udev/names/ significantly.

Also the /dev/{block,char}/MAJ:MIN" links are excluded from the name
stack - they are unique and can not conflict.
2009-09-09 18:49:07 +02:00
Kay Sievers 2ffc9cc191 change database file names
With very deeply nested devices, We can not use a single file
name to carry an entire DEVPATH. Use <subsystem>:<sysname> as
the database filename, which should also simplify the handling
of devices moving around, as these values will not change but
still be unique.

For the name stack we use the <maj>:<min> now as the filename.

> On Tue, Aug 18, 2009 at 09:59:56AM -0400, Ric Wheeler wrote:
> The first is that udev grumbles during boot about "file name too long"
> like the following:
>
> Aug 17 06:49:58 megadeth udevd-event[20447]: unable to create db file
> '/dev/.udev/db/\x2fdevices\x2fpci0000:00\x2f0000:00:04.0\x2f0000:17:00.0\x2f0000:18:0a.0\x2f0000:1f:00.0\x2fhost11\x2fport-11:0\x2fexpander-11:0\x2fport-11:0:0\x2fexpander-11:1\x2fport-11:1:0\x2fexpander-11:2\x2fport-11:2:17\x2fexpander-11:3\x2fport-11:3:1\x2fend_device-11:3:1\x2fbsg\x2fend_device-11:3:1':
> File name too long
2009-08-19 20:49:49 +02:00
Alan Jenkins 214a6c791c fix spelling
Fix spelling in docbook comments, code comments, and a local variable
name.  Thanks to "ispell -h" for docbook HTML and "scspell" for source
code.

Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
2009-08-08 15:42:05 +02:00
Kay Sievers a71369b0db libudev: device - free values before updating them 2009-07-08 02:02:40 +02:00
Kay Sievers 9cc94b1522 libudev: monitor - handle kernel supplied DEVNAME properly 2009-07-04 04:12:06 +02:00
Kay Sievers 456719b6f9 udevadm: test - print list of properties 2009-07-02 22:56:19 +02:00
Kay Sievers b25a94549c do not exports properties starting with a '.'
Private variables can be marked like:
  ENV{.FOO}="bar"
2009-06-28 02:21:58 +02:00
Kay Sievers 8d6bc73aef libudev: doc - add queue 2009-06-15 20:28:28 +02:00
Kay Sievers ce1d6d7fb4 libudev: doc - add section headers 2009-06-15 17:09:43 +02:00
Kay Sievers 1e5113228f libudev: update documentation 2009-06-15 13:22:38 +02:00
Kay Sievers a571016037 libudev: device_new() -> udev_device_new() 2009-06-09 13:11:23 +02:00
Kay Sievers 48a9b173e8 libudev: move to top-level directory 2009-06-08 21:36:06 +02:00
Renamed from udev/lib/libudev-device.c (Browse further)