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

4024 Commits

Author SHA1 Message Date
Kay Sievers
cdb1d7608a libudev: return kernel provided devnode when asked before we handled any rules 2010-10-22 13:56:16 +02:00
Martin Pitt
a74beafdcc keymap: Add Toshiba Satellite U500
https://launchpad.net/bugs/271706
2010-10-22 12:52:45 +02:00
Kay Sievers
1c2311c556 return proper error code in rename_netif()
<Md>  kay: can you look at rename_netif()? it returns -errno in a place,
      but I think that it may by changed by err() (at least)
<kay> Md: yeah, that doesn't look correct
2010-10-18 12:55:06 +02:00
Martin Pitt
60d19551d8 keymap: Apply force-release rules to all Samsung models.
The force-release list for Samsung is already an ultralong monster, and
reportedly still incomplete (see https://launchpad.net/bugs/574250).
Give up and instead apply the force-release quirk to all Samsung models. The
worst that can happen is that autorepeat behaves a bit weird, but that's much
better than a complete freeze after each keypress.
2010-10-13 18:08:41 +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
457c67e7c1 version bump 2010-10-13 13:08:29 +02:00
David Zeuthen
18f5c802df Install libgudev-1.0.so in prefix / instead of prefix /usr
This is to match where libudev.so is installed and it works because
all dependent libraries are already installed in / instead of /usr on
most distros:

 $ ldd /usr/lib64/libgudev-1.0.so
         linux-vdso.so.1 =>  (0x00007fff44dff000)
         libudev.so.0 => /lib64/libudev.so.0 (0x0000003bf2600000)
         libgobject-2.0.so.0 => /lib64/libgobject-2.0.so.0 (0x0000003fb5200000)
         libgthread-2.0.so.0 => /lib64/libgthread-2.0.so.0 (0x0000003fb4e00000)
         libpthread.so.0 => /lib64/libpthread.so.0 (0x0000003d5b000000)
         librt.so.1 => /lib64/librt.so.1 (0x0000003d5b800000)
         libglib-2.0.so.0 => /lib64/libglib-2.0.so.0 (0x0000003fb4a00000)
         libc.so.6 => /lib64/libc.so.6 (0x0000003d5ac00000)
         /lib64/ld-linux-x86-64.so.2 (0x0000003d5a800000)

With this change it is possible to write libgudev applications that
can be installed in /bin or /sbin and can run without /usr being
mounted. This is needed for e.g. udisks, NetworkManager and other
subsystem-specific daemons.

Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-10-11 12:10:02 -04:00
Harald Hoyer
d7cd2b1611 cdrom_id: request the drive profile features with a dynamic length
Some drives don't like huge feature buffers, so we query twice. First
run for the current profile and to get the length.
Second time we query the whole profile feature set.
2010-10-07 17:43:05 +02:00
Kay Sievers
d7628fbfcd release 163 2010-10-07 15:07:48 +02:00
Kay Sievers
392ef7a28a udevd: add sd-daemon.c 2010-10-07 14:59:11 +02:00
Kay Sievers
d8b9a5c12b systemd: sort before basic.target 2010-10-07 10:49:13 +02:00
Martin Pitt
1ebd2a5620 cdrom_id: Don't read beyond "last track" in TOC
Read the first and last track from the TOC header, and do not go beyond that
stated number of tracks when reading the TOC. Otherwise we interpret random
data which leads to bogus tracks. (Reported on an IronKey, which reported 1
data track, and 4 audio tracks which weren't actually present.)
2010-10-05 17:56:19 +02:00
Martin Pitt
678df8a461 cdrom_id: Fall back to CDROM_DRIVE_STATUS if all MMC commands fail
Reportedly, some "when I'm grown up I want to be a CD drive" fake USB CD sticks
like the IronKey neither support the SCSI "GET CONFIGURATION" nor the older
(pre-MMC2) "READ DISC INFORMATION" command. In that case, check if
cd_media_compat() detected that there is a disc present, and assume that we
have a CD-ROM medium.
2010-10-05 14:59:51 +02:00
Martin Pitt
13e0fca5df Revert "cdrom_id: Try reading the medium if all MMC commands fail"
Turns out we can do this much simpler by assuming that cd_media_compat() works,
which seems to be the case for the IronKey.

This reverts commit ea88774a92.
2010-10-05 14:57:04 +02:00
Martin Pitt
ea88774a92 cdrom_id: Try reading the medium if all MMC commands fail
Reportedly, some "when I'm grown up I want to be a CD drive" fake USB CD sticks
like the IronKey neither support the SCSI "GET CONFIGURATION" nor the older
(pre-MMC2) "READ DISC INFORMATION" command. In that case, check if we can read
data from the drive, and assume that we have a CD-ROM medium if it succeeds.
2010-10-05 14:34:55 +02:00
Kay Sievers
0bd77e2acd systemd: hook into basic.target instead of sysinit.target 2010-09-29 00:49:24 +02:00
Lee, Chun-Yi
e17f9c3cd5 keymap: Add alternate MSI vendor name
Add new vendor name "Micro-Star International" in 95-keymap.rules.

Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
2010-09-25 11:29:08 +02:00
Martin Pitt
b2ad12eb02 Add automatic rules syntax check
Add test/rule-syntax-check.py, a script for checking the syntax of all udev
rules files passed as command line arguments.

Add a wrapper test/rules-test.sh which calls rule-syntax-check.py on all udev
rules that we ship, but does nothing if Python is not available. Integrate this
into make check/distcheck.
2010-09-21 12:45:52 +02:00
Martin Pitt
c112a41a43 fix various syntax errors in rules 2010-09-21 12:14:50 +02:00
Martin Pitt
1079014420 Clarify WAIT_FOR documentation
The path is relative to the sysfs device, so this provides an easy way to wait
for an attribute to appear.
2010-09-21 12:12:01 +02:00
Torsten Schoenfeld
daef8ae33c gudev: add a few annotations that newer gobject-introspection versions demand 2010-09-20 10:25:55 +02:00
Martin Pitt
2f5e49cd87 keymap: Add Lenovo Y550
https://launchpad.net/bugs/543065
2010-09-14 18:21:13 +02:00
David Zeuthen
645d40d004 Bump required GLib version to 2.22
This is needed for g_main_context_get_thread_default().

Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-09-07 11:11:11 -04:00
David Zeuthen
cbdf255e25 gudev: Deliver ::uevent signal in the thread-default main loop
... that the GUdevClient object was constructed in. This change makes
GUdev follow the GLib guidelines and, more importantly, makes it
possible to actually use the library in a multi-threaded
application. Prior to this patch, signals were emitted in the thread
that ran the "default" main loop.

Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-09-07 11:04:57 -04:00
Kay Sievers
cff2f9a3c8 scsi_id: fix compiler warnings 2010-09-07 08:24:12 +02:00
Hannes Reinecke
db11b20e41 scsi_id: export target port group
For ALUA support it's useful to have the target port group number
of a device.

Signed-off-by: Hannes Reinecke <hare@suse.de>
2010-09-07 08:22:05 +02:00
Kay Sievers
397e0169bb version bump 2010-09-03 15:14:36 +02:00
Kay Sievers
e7638c038b release 162 2010-09-03 15:07:03 +02:00
Kay Sievers
f74310b4a0 Revert "Add alternative KVM MAC address blacklist"
This reverts commit 634afac119.

54:52:00 was just a bug in libvirt, and that's better fixed locally,
and we should not carry it in udev rules.
2010-09-03 14:08:14 +02:00
Kay Sievers
a04879b564 systemd: enable all udev services unconditionally 2010-09-03 13:30:57 +02:00
Michal Soltys
8937f371fb ChangeLog fix
In v141 -> v142 entry, there's a note about udevd creating
/dev/{null,kmsg,console}. It was added in commit 540f46698d,
but shortly after that removed in a00bdfa16b before v142
release.

Signed-off-by: Michal Soltys <soltys@ziu.info>
2010-09-03 10:53:26 +02:00
Martin Pitt
634afac119 Add alternative KVM MAC address blacklist
Reportedly, older KVM/Qemu instances indeed do use 54:52:00:*,
so add this as an alternative.
2010-09-02 11:11:32 +02:00
Michael Forney
620343ddd6 Don't install systemd scripts with --without-systemdsystemunitdir
Currently, the scripts get installed to /no/ if that option is
specified.

Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
2010-09-02 08:54:37 +02:00
Martin Pitt
d4de0a0321 do not create persistent name rules for VMWare network interfaces
Not generating persistent MAC address rules will significantly ease cloning of
VMs.  The kernel reliably sorts eth* enumeration by bus number, so as long as
you only have cards from one vendor (or more precisely, drivers), the
enumeration will be stable. Having cards from different vendors is very
unlikely in VMs.

KVM was already covered in the previous commit, this is the equivalent
blacklist for VMWare:

  http://www.coffer.com/mac_find/?string=005056
  http://www.coffer.com/mac_find/?string=000c29

https://launchpad.net/bugs/341006
2010-09-02 08:39:12 +02:00
Martin Pitt
c03180194c Fix KVM MAC address range
KVM uses 52:54:00:* MACs:

  http://git.savannah.gnu.org/cgit/qemu.git/tree/net.c#n796
2010-09-02 08:32:43 +02:00
Marco d'Itri
af29bf0966 do not create persistent name rules for KVM network interfaces
The virtual interfaces created by KVM are stable, 54:52:00 is the MAC-48
range of KVM.
2010-08-31 21:44:34 +02:00
Kay Sievers
326c5fc3ea set SELinux context on 'add' but not on 'change' events 2010-08-31 21:29:21 +02:00
Jan Drzewiecki
5e267ea5a3 cdrom_id: Fix DVD blank detection for sloppy firmware
Reportedly, many CD drive firmwares will only consider the MSB in a READ
command, thus if we request 17 blocks to be read, we'll actually only get 16 in
many cases, and thus miss out the interesting sector #17. This would lead to
falsely considering nonempty DVDs as blank.

Fetch 32 blocks now, which should work everywhere.

Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
2010-08-31 00:41:35 +02:00
Martin Pitt
2458db3edd cdrom_id: Fix DVD-RW media detection
Commit cf2205a19 applied the "restricted overwrite" vs. "sequential" DVD-RW
test to feature_profiles() (which reads the drive capabilities), which caused
every DVD medium to be detected as ID_CDROM_MEDIA_DVD_RW. Now apply it to
cd_profiles() instead, to just check the current profile.
2010-08-30 15:33:26 +02:00
Martin Pitt
d17c065e28 keymap: Fix Acer TravelMate 4720
The previous change just fixed the Bluetooth key, but Screen Lock and Browser
also need to be changed.

https://launchpad.net/bugs/569815
2010-08-27 18:48:53 +02:00
Martin Pitt
e4dcdc4ab2 gudev: fix crash if netlink is not available
gudev_client_new() assumes that priv->monitor is never NULL, but this happens
on older kernels. Let's not crash client programs because of that.

https://launchpad.net/bugs/581527
2010-08-27 18:12:59 +02:00
Martin Pitt
83184d008b udev(7) manpage: Fix description of $attr
Fix the manpage to describe the real behaviour of $attr: It doesn't search all
parent devices any more, just the one selected by KERNELS etc.

https://launchpad.net/bugs/348513
2010-08-27 16:56:32 +02:00
Martin Pitt
38b5ccbcf7 keymap: Fix Sony VAIO VGN-SZ2HP/B
Reportedly this needs the module-sony keymap, not the -old one.

https://launchpad.net/bugs/613578
2010-08-25 17:02:51 +02:00
Luca Tettamanti
c61eea9459 Add support for oom_score_adj
/proc/<pid>/oom_adj has been deprecated (kernel v2.6.36) due to the
rework of the badness heuristic; oom_score_adj is the replacement.
Keep a fallback to the old interface for compatibility with older
kernels.

See http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=a63d83f427fbce97a6cea0db2e64b0eb8435cd10

Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
2010-08-25 16:50:30 +02:00
Kay Sievers
13f90be7a3 udevd: remove unneeded credential passing from init_notify() 2010-08-25 16:26:54 +02:00
Martin Pitt
92cffb0bd1 keymap: Add HP G60
https://launchpad.net/bugs/554944
2010-08-23 10:47:28 +02:00
Martin Pitt
acf865b68e keymap: Add Onkyo PC
Thanks to Pau Oliva!

https://launchpad.net/bugs/612529
2010-08-22 11:00:34 +02:00
Martin Pitt
6593e8961a udev(7): Point out required extension, and remove some confusion
Rules files must end in .rules.

Also drop the redundant and confusing sentence about "file names must be
unique". What is really meant is explained in a better way in the paragraph
above.

https://launchpad.net/bugs/616108
2010-08-20 12:19:23 +02:00
Kay Sievers
f7b877ec49 version bump 2010-08-19 18:03:04 +02:00
Kay Sievers
4c9b12a7aa init: edit systemd service descriptions 2010-08-19 18:02:20 +02:00