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

3891 Commits

Author SHA1 Message Date
Thomas Egerer
6ee9b2cb8c udevd: add 'N:' to optstring in getopt_long 2011-03-31 17:26:37 +02:00
Lee, Chun-Yi
ff4a035a8a Add rule for Acer Aspire One ZG8 to use acer-aspire_5720 keymap
Acer Aspire One ZG8's bluetooth HW key emit 0xD9 scancode, it must map
to KEY_BLUETOOTH like Acer Aspire 5720. So, add rule for Acer Aspire One
ZG8 use acer-aspire_5720 keymap.

Tested on Acer Aspire One ZG8 netbook.

Signed-off-by: Lee, Chun-Yi <jlee@novell.com>
Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
2011-03-31 16:37:31 +02:00
Kay Sievers
daf32d3217 systemd: let settle depend on trigger, do not block basic with trigger 2011-03-31 13:16:42 +02:00
David Zeuthen
42b9482ab2 Run ata_id on non-removable USB devices
If a USB device is marked as removable, it is often a SATA/PATA disk
in an enclosure (note that flash card readers and usb storage sticks
are always marked as removable). In this case, try running ata_id
(which sends ATA commands wrapped in SCSI ATA PASS THROUGH commands)
to get information about the disk. If this fails, just fall back to
running usb_id since it could be the device isn't an ATA device at
all or the device doesn't have a SAT layer.

This extra information is nice to have as it indicates if it is
suitable to send e.g. SMART commands to the disk, whether the disk
supports power management and so on. Additionally, the VPD and serial
number returned by ata_id is usually more accurate as it stems from
the disk itself instead of the enclosure.

Note that udisks has been doing this for a while

 KERNEL=="sd*[!0-9]", ATTR{removable}=="0", ENV{ID_BUS}=="usb", ENV{DEVTYPE}=="disk", IMPORT{program}="udisks-probe-ata-smart $tempnode"

so this change shouldn't be too disruptive (udisks-probe-ata-smart
also sends ATA commands via the ATA PASS THROUGH command).

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-03-30 10:28:24 -04:00
Kay Sievers
a138cd0714 version bump 2011-03-30 16:03:56 +02:00
Kay Sievers
30b0fee9be release 167 2011-03-30 15:58:14 +02:00
Kay Sievers
7ce99fece5 systemd: udev.socket - disable implicit dependencies
Set hostname to <eeepc>.
  Found ordering cycle on sysinit.target/start
  Walked on cycle path to systemd-tmpfiles-setup.service/start
  Walked on cycle path to local-fs.target/start
  Walked on cycle path to fedora-storage-init.service/start
  Walked on cycle path to fedora-wait-storage.service/start
  Walked on cycle path to udev-settle.service/start
  Walked on cycle path to udev.service/start
  Walked on cycle path to udev.socket/start
  Walked on cycle path to sysinit.target/start
  Breaking ordering cycle by deleting job systemd-tmpfiles-setup.service/start
2011-03-29 17:59:29 +02:00
Kay Sievers
ce440d1c1b systemd: do not enable udev-settle.service by default
This barrier service is usually not enabled by default. If enabled,
it acts as a barrier for basic.target -- so all later services will
wait for udev completely finishing its coldplug run.

It might be enabled just unconditionally, or pulled-in on-demand by
broken or non-hotplug-aware services that assume a fully populated
/dev at startup.
2011-03-29 01:14:53 +02:00
Kay Sievers
b4155660f2 libudev: make valgrind happy
Warning: noted but unhandled ioctl 0x641e with no size/direction hints
  Syscall param socketcall.setsockopt(optval) points to uninitialised byte(s)
  at 0x6A30BAA: setsockopt (syscall-template.S:82)
  by 0x4E36E1C: udev_monitor_filter_update (libudev-monitor.c:347)
  by 0x4E36ED8: udev_monitor_enable_receiving (libudev-monitor.c:373)
  by 0x8A9E68E: I830ScreenInit (intel_driver.c:838)
  by 0x42EE9E: AddScreen (dispatch.c:3890)
  by 0x471561: InitOutput (xf86Init.c:738)
  by 0x422C18: main (main.c:205)
  Location 0x7ff0000c2 is 2 bytes inside local var "filter"
  declared at libudev-monitor.c:256, in frame #1 of thread 1
  Uninitialised value was created by a stack allocation
  at 0x4E30860: ??? (in /lib64/libudev.so.0.10.0)

Thanks to Zdenek Kabelac.
2011-03-28 14:34:05 +02:00
Kay Sievers
672ff71911 libudev: docs - add udev_get_run_path() 2011-03-25 17:58:30 +01:00
Kay Sievers
6e0768d290 libudev: export udev_get_run_path() 2011-03-25 16:29:36 +01:00
Seth Forshee
641842bce2 keymap: continue reading keymap after invalid scancodes
Reading of keymaps is aborted when EINVAL is returned from EVIOCGETKEYCODE.
Scan codes are not always continuous ranges of values starting at 0, so this
can result in not getting the full keymap for a device. Instead, continue
processing if EINVAL is returned.
2011-03-24 16:33:54 +01:00
Kay Sievers
864fde8a08 man: remove trigger --type=failed handling 2011-03-23 23:56:15 +01:00
Kay Sievers
079f5697c1 systemd: use sockets.target not socket.target 2011-03-23 20:35:19 +01:00
Kay Sievers
fc1de713f5 systemd: bind udev control socket in systemd and split udev.service
We should bind the udev socket from systemd, so we are sure
that the abstract namespace socket is always bound by a root
process and there is never a window during an update where
an untrusted process can steal our socket.

Also split the udev.service file, so that the daemon can be
updated/restarted without triggering any coldplug events.
2011-03-23 16:40:23 +01:00
Kay Sievers
a31d76b186 rules: run ata_id only on SPC-3 or later optical drives 2011-03-23 12:11:38 +01: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
3c6ee19027 udevd: initialize fds, for proper close() on exit 2011-03-23 01:45:21 +01:00
Kay Sievers
cf3b3fbcd5 udevd: use facility == LOG_DAEMON when writing to /dev/kmsg
Syslog wants to distinguish the sorce of messages. We should
indicate that this is a userspace message (LOG_DAEMON) and not
a kernel message (LOG_KERNEL).
2011-03-23 01:41:25 +01:00
Kay Sievers
b7822bc498 update sd-daemon.[ch] 2011-03-23 01:34:29 +01:00
Kay Sievers
180bac9db8 fstab_import: remove from configure 2011-03-19 18:28:57 +01:00
Kay Sievers
baf2b4eb0b systemd: remove deprecated udev-retry.service 2011-03-19 18:13:01 +01:00
Kay Sievers
21c53d918a fstab_import: disable build 2011-03-19 18:11:12 +01:00
Kay Sievers
7a959f1b07 input_id: silent gcc warnings 2011-03-19 17:04:56 +01:00
Martin Pitt
1d8296d6ed input_id: Rewrite debug logging to use standard udev info() 2011-03-18 16:18:17 +01:00
Martin Pitt
792479aca5 input_id: Cover key devices which only have KEY_* > 255
We previously only tested the "key" capabilities for keys between 0 and 255 to
determine ID_INPUT_KEY. If there are none, also check for keys in the upper
block (KEY_OK/0x160 to KEY_TOUCHPAD_OFF/0x214).
2011-03-18 14:45:42 +01:00
Martin Pitt
88149f668e input_id: Avoid memory overflow with too long capability masks
Joey Lee <jlee@novell.com> reported a problem on an MSI laptop which reports a
too long capabilities/key:

E: EV==3
E: KEY==180000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

This is longer than KEY_MAX and thus caused a memory overflow. Guard against
this now and just ignore the excess blocks.
2011-03-18 13:56:32 +01:00
Martin Pitt
941c40bdc4 input_id: Add some debugging output
If $DEBUG is set, output the capability bitmaps to stderr.
2011-03-18 13:42:02 +01:00
Martin Pitt
7a86845ba1 input_id: Consistently use tabs for indentation 2011-03-18 13:32:55 +01:00
Harald Hoyer
5e199245f2 udev-acl/70-acl.rules: tag ID_REMOTE_CONTROL with acl
Used by "concordance" to access Logitech Harmony programmable remote
controls.

http://www.phildev.net/concordance/
2011-03-17 20:42:12 +01:00
Kay Sievers
e68b4c2857 NEWS: clarify /dev/.run/ requirements 2011-03-16 18:58:03 +01:00
David Zeuthen
98ab6a3772 cdrom_id: Don't ignore profiles when there is no media available
Just because the GET CONFIGURATION MMC-2 command returns the current
profile as 0 does not mean that we can ignore the profiles describing
the capabilities of the drive - it only means that there currently is
no recognized media in the drive. Therefore, do process the returned
profiles even when cur_profile is 0.

This fixes a bug where only

 ID_CDROM=1
 ID_CDROM_CD_R=1
 ID_CDROM_CD_RW=1
 ID_CDROM_DVD=1
 ID_CDROM_DVD_R=1
 ID_CDROM_DVD_RAM=1

was returned when there is no media in the drive instead of

 ID_CDROM=1
 ID_CDROM_CD=1
 ID_CDROM_CD_R=1
 ID_CDROM_CD_RW=1
 ID_CDROM_DVD=1
 ID_CDROM_DVD_R=1
 ID_CDROM_DVD_RW=1
 ID_CDROM_DVD_RAM=1
 ID_CDROM_DVD_PLUS_R=1
 ID_CDROM_DVD_PLUS_RW=1
 ID_CDROM_DVD_PLUS_R_DL=1
 ID_CDROM_BD=1
 ID_CDROM_BD_R=1
 ID_CDROM_BD_RE=1
 ID_CDROM_HDDVD=1

as is returned now.

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-03-15 12:33:35 -04: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
Lee, Chun-Yi
52d54f237d Remap MSI Laptop touchpad on/off key to F22 and F23
MSI Laptop driver will query the real touchpad state then emit
KEY_TOUCHPAD_ON/OFF key.

Currently, X has defined F22 for touchpad on and F23 for touchpad
off. This patch aligns MSI Laptop driver's key with F22 and F23.

Tested on MSI U160 netbook using msi-laptop driver.

Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
2011-03-10 08:51:06 +01:00
Thomas Egerer
74e8a45ed4 udevadm: info - make attribute array static and const 2011-03-08 13:14:44 +01:00
Kay Sievers
71e65e8683 udev-acl: move sg rule to optical drive rule 2011-03-07 16:10:50 +01:00
Andrey Borzenkov
37d3d6abde udev-acl: add /dev/sgX nodes for CD-ROM
Current wine is using /dev/sgX to access CD-ROM devices. Since
distributions switched to using ACL instead of group membership
to control device access, wine is not able to access them.

Add ACL to device nodes that already get GROUP="cdrom".

Ref: https://qa.mandriva.com/show_bug.cgi?id=62114

Signed-off-by: Andrey Borzenkov <arvidjaar@mail.ru>
2011-03-07 16:09:38 +01:00
Kay Sievers
218e47ae0f libudev: bump minor version 2011-03-05 06:27:31 +01:00
Kay Sievers
3e0a2c9a50 libudev: resolve ifindex in udev_device_new_from_id_filename() 2011-03-05 06:26:39 +01:00
Kay Sievers
20bee04c19 libudev: udev_device_get_sysattr_list_entry() update 2011-03-04 23:00:52 +01:00
Kay Sievers
d53a3878d2 test-libudev: add short options 2011-03-04 22:56:54 +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
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
Lee, Chun-Yi
30c2b6f10f Remap Acer WMI touchpad toggle key to F21 used by X
Currently, Acer WMI driver generates KEY_F22 but this
will soon change to KEY_TOUCHPAD_TOOGLE.

X has defined F21 for the purpose of touchpad toggle and other
udev keymaps align with this meaning.  Patch aligns Acer WMI
hotkey drivers with F21.

Tested on Acer TravelMate 8572 notebook using acer-wmi driver.

Cc: Carlos Corbacho <carlos@strangeworlds.co.uk>
Cc: Matthew Garrett <mjg@redhat.com>
Cc: Dmitry Torokhov <dtor@mail.ru>
Cc: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Lee, Chun-Yi <jlee@novell.com>
Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
2011-03-01 12:54:00 +01:00
Harald Hoyer
551b143e13 cdrom_id: cd_media_toc() extend toc size to 65536
Seems like an iDRAC reports a lot of toc entries.

"For cd_media_toc() will have to be modified to handle larger
tables right now it has an "unsigned char toc[2048]" but the toc
can be up to 65536 bytes long . I got a TOC length of 4610 bytes,
causing cd_media_toc() to fail."

https://bugzilla.redhat.com/show_bug.cgi?id=660367

Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
2011-02-24 16:59:21 +01:00
Martin Pitt
7ae8a463be keymap: Fix Acer Aspire 5920G media key
From downstream bug: "In Windows this button launch Acer Arcade or Acer Arcade
Deluxe application - it's media center like XBMC."

https://launchpad.net/bugs/637695
2011-02-20 17:58:55 +01:00
Kay Sievers
0c19cc73da update some comments 2011-02-15 22:28:31 +01:00
Kei Tokunaga
c54b43e2c2 udevadm: enumerate - update prev pointer properly
When I tried to boot a system with 256 disks x 4 paths with
device-mapper, udevadm trigger (--type=devices) that was called
from start_udev ended up dumping a core due to a segmentation
fault.

In udev_enumerate_get_list_entry(), if it finds the devices that
should be delayed, it calls syspath_add().  If realloc() in
syspath_add() allocates the required memory at a different memory
address, referring prev->len afterward causes the segmentation
fault.

Signed-off-by: Kei Tokunaga <tokunaga.keiich@jp.fujitsu.com>
2011-02-15 22:28:31 +01:00
Martin Pitt
f3f70f8d9e v4l_id: Drop videodev.h check again
It only uses v4l2 now.
2011-02-15 17:33:05 +01:00
Kay Sievers
89284ddac4 v4l_id: remove left-over variable 2011-02-15 17:27:29 +01:00