1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-06 08:26:52 +03:00
Commit Graph

57 Commits

Author SHA1 Message Date
Kay Sievers
9ead662791 udevadm: info --cleanup-db
Most of the udev database from initramfs should be deleted before
starting udev in the real root. udevadm: info --cleanup-db deletes
all database entries in /run/udev. Events that processed IMPORT{db},
or mark devices explicitely as persistent, will be excluded.
2011-04-13 22:33:01 +02:00
Kay Sievers
4ec9c3e797 use /run/udev/ if possible and fall back to /dev/.udev/ 2011-03-23 02:31:09 +01:00
Kay Sievers
5f59fa0900 move /dev/.udev/ to /dev/.run/udev/ and convert old udev database at udevd startup 2011-03-15 17:26:08 +01:00
Thomas Egerer
74e8a45ed4 udevadm: info - make attribute array static and const 2011-03-08 13:14:44 +01:00
Kay Sievers
20bee04c19 libudev: udev_device_get_sysattr_list_entry() update 2011-03-04 23:00:52 +01:00
Thomas Egerer
95ce1875d7 libudev: use sysfs attr ilist interface for attribute walk
Signed-off-by: Thomas Egerer <thomas.egerer@secunet.com>
2011-03-04 21:51:32 +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
88163971b9 udevadm: info - honor --export and --export-prefix for property query
The output will always be quoted:
  $ udevadm info --export --export-prefix=MY_ --query=property --name=sda
  MY_UDEV_LOG='3'
  MY_DEVPATH='/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda'
  MY_MAJOR='259'
  MY_MINOR='0'
  MY_DEVNAME='sda'
  MY_DEVTYPE='disk'
  MY_SUBSYSTEM='block'
2010-12-10 01:18:14 +01:00
Yin Kangkai
163c0365ff udevadm: fix short options in getopt() 2010-07-28 06:56:13 +02:00
Kay Sievers
88cbfb09ee while (1) -> for (;;) 2010-05-27 15:11:00 +02:00
Kay Sievers
e7964b93e8 udevadm: info --export-db -- remove watch handle export 2010-04-22 06:24:47 +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
299650f1e3 udevadm: info - fix info --root --query=name --path= for device without a device node
Subject: Bug#561279: udev: Crash location and first-level cause
Reply-To: Stephen Kitt <steve@sk2.org>, 561279@bugs.debian.org
2009-12-24 20:42:02 +01:00
Kay Sievers
78715f65c9 fix randonm findings from llvm-clang-analyzer
Thanks to Lennart for the log file!
2009-09-08 22:11:04 +02:00
Kay Sievers
fc206fbe3e update a few years of copyright 2009-08-01 09:39:18 -04:00
Kay Sievers
405c307a72 udevadm: info - add space after R:, A:, W: on database export
<zzam> kay: udevadmin info -e prints all lines with a space after the :, but the W: line
<kay> zzam: yeah, seems so, and the R: and the A:
<zzam> yeah
2009-07-08 17:05:55 +02:00
Kay Sievers
ff5d99e0b0 udevadm: info -revert "accept --query without argument"
Getopt is too dumb, the optional argument breaks "udevadm -q symlink".
2009-06-10 15:55:24 +02:00
Kay Sievers
0254b2118f udevadm: info - accept --query without a value and print properties 2009-06-07 02:39:54 +02:00
Kay Sievers
e6c1a2bde7 use openat(), unlinkat(), fstatat() 2009-05-20 18:58:52 +02:00
Kay Sievers
065db05221 use more efficient string copying 2009-05-20 17:57:52 +02:00
Kay Sievers
f1e7e36046 udevadm: add text for new options to command and man page 2009-03-07 02:32:40 +01:00
Kay Sievers
b38a5801f9 udevadm: info - export all devices with --export-db 2009-02-26 22:59:40 +01:00
Scott James Remnant
c08337da5c Output watch handle in udevadm info. 2009-02-23 17:48:18 +00:00
Kay Sievers
b620292bd2 udevadm: s/udevinfo/udevadm info/ 2009-01-05 12:28:09 +01:00
Kay Sievers
50025605e0 udevadm: info - unify -V and --version 2008-11-13 07:31:04 +01:00
Kay Sievers
69239210be libudev: device - get_attr_value() -> get_sysattr_value() 2008-10-20 18:12:36 +02:00
Kay Sievers
aa8734ffcb udevd: use libudev 2008-10-16 17:16:58 +02:00
Kay Sievers
ee137da389 udevadm: info - fix --query=all for devices without a device node 2008-10-03 10:33:15 +02:00
Kay Sievers
033e9f8cde use no_argument, required_argument, optional_argument in longopts 2008-10-02 16:49:05 +02:00
Kay Sievers
62b9dfb622 libudev: device - handle /sys/block/<disk-device-link>/<partition> 2008-10-01 10:22:47 +02:00
Kay Sievers
c97f839eed libudev: enumerate - scan devices and subsystems, add subsystem and attribute filter 2008-09-30 13:42:26 +02:00
Kay Sievers
4aa0b15efb fix dbg() callers 2008-09-29 19:03:08 +02:00
Kay Sievers
438d4c3cd4 libudev: enumerate - split new() and scan() 2008-09-29 02:00:17 +02:00
Kay Sievers
bc8184ede9 libudev: enumerate - accept list of subsystems to scan, or skip 2008-09-28 17:39:31 +02:00
Kay Sievers
0de33a61d7 libudev: more list rework 2008-09-28 01:34:55 +02:00
Kay Sievers
e345e2670a libudev: rework list handling 2008-09-26 19:44:53 +02:00
Kay Sievers
cd42b50d86 libudev: enumerate_get_devices_list -> enumerate_get_list 2008-09-26 19:41:50 +02:00
Kay Sievers
bf7ad0ea66 libudev: replace awkward callback list interfaces with list iterators 2008-09-25 04:20:27 -07:00
Kay Sievers
fb762bb928 libudev: udev_device_get_devname -> udev_device_get_devnode 2008-09-20 00:01:20 -07:00
Kay Sievers
38f27948cd always include config.h from Makefile 2008-09-19 23:03:49 -07:00
Kay Sievers
a076080bd4 libudev: pass udev_device in enumerate 2008-09-17 23:32:43 -07:00
Kay Sievers
8753fadf2a libudev: switch API from devpath to syspath 2008-09-15 17:12:47 -07:00
Kay Sievers
9a8047fa29 udevadm: info - fix lookup-by-name 2008-09-15 12:01:35 -07:00
Kay Sievers
93b0f38458 libudev: udev_device - add attribute cache 2008-09-13 21:09:28 +02:00
Kay Sievers
b2d9e4f200 libudev: switch to "udev_device_get_parent" 2008-09-12 00:58:40 +02:00
Kay Sievers
4ad3a37f50 udevadm: info - use "udev_device" 2008-09-11 17:08:12 +02:00
Kay Sievers
17fcfb5972 use size definitions from libudev 2008-09-10 21:50:21 +02:00
Kay Sievers
31c1f53745 get rid of udev_sysdeps.c 2008-09-10 18:59:42 +02:00