summaryrefslogtreecommitdiff
path: root/udev_db.c
AgeCommit message (Collapse)Author
2008-03-29udevadm: info - resolve devpath if symlink is givenKay Sievers
2007-08-26track "move" events to rename database and failed filesKay Sievers
2007-04-06udevinfo: export all information stored in databaseKay Sievers
2007-03-23udevinfo: relax check for the correct device if looked up by nameKay Sievers
2007-03-21udevtest: add --force modeKay Sievers
2007-03-18priority based symlink handlingKay Sievers
Symlinks can have priorities now, the priority is assigned to the device and specified with OPTIONS="link_priority=100". Devices with higher priorities overwrite the symlinks of devices with lower priorities. If the device, that currently owns the link goes away, the symlink will be removed, and recreated, pointing to the next device with the highest actual priority. This should solve the issue, that inserting an USB-stick may overwrite the /dev/disk/by-id/-link of another disk, and removes the entire link after the USB-stick is disconnected. If no priorities are specified, the new link will overwrite the current one, and if the device goes away, it will restore the old link. It should be possible to assign lower priorities to removable devices, if needed. In multipath setups, we see several devices, which all connect to the same volume, and therefore all try to create the same metadata-links. The different path-devices are combined into one device-mapper device, which also contains the same metadata. It should be possible, to assign multipath-table device-mapper devices a higher priority, so path-devices that appear and disappear, will not overwrite or delete the device-mapper device links.
2007-03-17read list of devices from index, make index private to databaseKay Sievers
2007-03-16cleanup already existing db-entries and db-index on device updateKay Sievers
2007-03-16pick actual valid device in udev_db_lookup_nameKay Sievers
2007-03-16add link_priority to rule options, and store it in databaseKay Sievers
2007-03-16store devpath with the usual leading slashKay Sievers
2007-03-15maintain index over device-names to devpath relationKay Sievers
2007-03-14encode db-file names, instead of just replacing '/'Kay Sievers
2007-01-23unlink old database file before creating a new oneSergey Vlasov
udev_db_add_device() can be called when the corressponding database entry already exists - it should overwrite the old entry in this case. However, if the old entry was a symlink, fopen(filename, "w") will not overwrite it properly - it will keep the symlink and create a file named after the symlink target. Calling unlink(filename) before trying to create the database file fixes the problem. Signed-off-by: Sergey Vlasov <vsu@altlinux.ru>
2006-08-28update source file headersKay Sievers
2006-08-24rename major/minor variable to maj/min to avoid warningKay Sievers
2006-08-24udev_db.c: include <sys/stat.h>Kay Sievers
2006-08-21db: don't create a db file for only a node name to storeKay Sievers
2006-08-19consistent key naming to match only the event device or include all parent ↵Kay Sievers
devices This scheme is more consistent and makes it obvious if a match happens against the event device only, or the full chain of parent devices. The old key names are now: BUS -> SUBSYSTEMS ID -> KERNELS SYSFS -> ATTRS DRIVER -> DRIVERS Match keys for the event device: KERNEL SUBSYSTEM ATTR DRIVER (in a future release, for now the same as DRIVERS) Match keys for all devices along the parent device chain: KERNELS SUBSYSTEMS ATTRS DRIVERS ID, BUS, SYSFS are no longer mentioned in the man page but still work. DRIVER must be converted to DRIVERS to match the new scheme. For now, an error is logged, if DRIVER is used. In a future release, the DRIVER key behaviour will change.
2006-08-18db: store devpath - node relationship for all devicesKay Sievers
If we don't have any interesting values to store, we just use a symlink (doesn't occupy a whole page on tmpfs like a file) to store the name of the node belonging to a devpath. This will allow udevinfo to resolve all names, even when we don't have a full database entry.
2006-01-09replace libsysfsKay Sievers
We never used any of the libsysfs convenience features. Here we replace it completely with 300 lines of code, which are much simpler and a bit faster cause udev(d) does not open any syfs file for a simple event which does not need any parent device information. Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-12-20don't log error if database does not existKay Sievers
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-11-24merge two consecutive static strlcat'sKay Sievers
Thanks for Marco, who noticed it. Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-11-16remove "udev_db" option from config fileKay Sievers
All udev state is kept in /$udev_root/.udev/ now. No option to configure that anymore, it will always be there. Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-11-07move some logging from dbg() to info()Marco d'Itri
2005-11-07add strerror() to error logsMarco d'Itri
2005-08-27don't store devpath in udevdb, we don't need itKay Sievers
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-08-27change parameter order of udev_db_search_name()Kay Sievers
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-08-27prepare for new HAL udevdb dumpKay Sievers
HAL soon wants to read the whole content of the udevdatabase while starting up. This makes the whole udev structure available to the udevinfo "dump". Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-08-26fix lookup for name in the udevdb, it should return the devpathKay Sievers
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-08-15cleanup some debug output and move to info level + unify select() loopsKay Sievers
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-08-13fix more compiler warnings ...Kay Sievers
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-08-08switch some strlcpy's to memcpyKay Sievers
strlcpy counts the sourec string lengt and is therefore not suitable to copy a defined length of characters from one string to another. Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-07-22move code to its own filesKay Sievers
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-07-05create udevdb files only if somehting interesting happenedKay Sievers
Device nodes created with the default rule, without any symlink or option are no longer saved to the udevdb. This saves us ~3 MB RAM for pretty much useless files on tmpfs. Note: HAL needs a fix to handle this correctly. It's already available on the list. Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-06-26store the imported device information in the udevdbKay Sievers
Any program can query with udevinfo for persistent device attributes evaluated on device discovery now. Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-04-26[PATCH] fix klibc's broken strlcpy/strlcatkay.sievers@vrfy.org
udevinfo segfaults cause klibc's strlcpy writes behind the specified size of the destination string. strlcat truncates the destination string which is also not what you expect from a concatenation function.
2005-04-26[PATCH] support log-priority levels in udev.confkay.sievers@vrfy.org
2005-04-26[PATCH] replace strncpy()/strncat() by strlcpy()/strlcat()kay.sievers@vrfy.org
2005-04-26[PATCH] udev_volume_id: version 39kay.sievers@vrfy.org
2005-04-26[PATCH] udevinfo -d: speed-up device dumpkay.sievers@vrfy.org
2005-04-26[PATCH] allow unlimitied count of symlinkskay.sievers@vrfy.org
2005-04-26[PATCH] unmap db-file after usekay.sievers@vrfy.org
2005-04-26[PATCH] udevinfo: print devpath -> node relationship for all deviceskay.sievers@vrfy.org
2005-04-26[PATCH] trivial rename of some variableskay.sievers@vrfy.org
2005-04-26[PATCH] cleanup db functionskay.sievers@vrfy.org
2005-04-26[PATCH] switch major/minor to dev_tkay.sievers@vrfy.org
2005-04-26[PATCH] remove the device node only if the major/minor number matcheskay.sievers@vrfy.org
2005-04-26[PATCH] fix -Wsign-compare warningskay.sievers@vrfy.org
2005-04-26[PATCH] rename udev_lib to udev_utils and dev_d to udev_multiplexkay.sievers@vrfy.org