summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuli Suominen <ssuominen@gentoo.org>2010-08-21 09:17:06 +0000
committerSamuli Suominen <ssuominen@gentoo.org>2010-08-21 09:17:06 +0000
commit062792a07847680d3a2c267a862f219a5ef5ea23 (patch)
tree26d542972c55c64a4fdb7895f65138f496f68384 /sys-fs/udisks/files
parentBug #333737: version bump. (diff)
downloadhistorical-062792a07847680d3a2c267a862f219a5ef5ea23.tar.gz
historical-062792a07847680d3a2c267a862f219a5ef5ea23.tar.bz2
historical-062792a07847680d3a2c267a862f219a5ef5ea23.zip
Fix long hangs on probing nonexistant floppies.
Package-Manager: portage-2.2_rc67/cvs/Linux x86_64
Diffstat (limited to 'sys-fs/udisks/files')
-rw-r--r--sys-fs/udisks/files/udisks-1.0.1-no-floppy.patch30
1 files changed, 30 insertions, 0 deletions
diff --git a/sys-fs/udisks/files/udisks-1.0.1-no-floppy.patch b/sys-fs/udisks/files/udisks-1.0.1-no-floppy.patch
new file mode 100644
index 000000000000..1d69d1cbc89d
--- /dev/null
+++ b/sys-fs/udisks/files/udisks-1.0.1-no-floppy.patch
@@ -0,0 +1,30 @@
+From ca93d4e2d9e7f483b2fde1725da086e2cca44164 Mon Sep 17 00:00:00 2001
+From: Martin Pitt <martin.pitt@ubuntu.com>
+Date: Wed, 02 Jun 2010 13:56:07 +0000
+Subject: Fix long hangs on probing nonexistant floppy drives
+
+A lot of modern machines do not have a floppy drive any more, but still have a
+floppy controller somewhere (or at least the BIOS pretends to). Trying to
+open(/dev/fd0) on these machines causes long hangs, which lead to long desktop
+startup times.
+
+To fix this, avoid probing floppies for media in update_info().
+
+https://launchpad.net/bugs/539515
+---
+diff --git a/src/device.c b/src/device.c
+index 763385c..0e87f1d 100644
+--- a/src/device.c
++++ b/src/device.c
+@@ -4471,7 +4471,8 @@ update_info (Device *device)
+ {
+ media_available = FALSE;
+
+- if (!g_udev_device_get_property_as_boolean (device->priv->d, "ID_CDROM"))
++ if (!g_udev_device_get_property_as_boolean (device->priv->d, "ID_CDROM") &&
++ !g_udev_device_get_property_as_boolean (device->priv->d, "ID_DRIVE_FLOPPY"))
+ {
+ int fd;
+ fd = open (device->priv->device_file, O_RDONLY);
+--
+cgit v0.8.3-6-g21f6