1 |
ssuominen 10/08/21 09:17:06 |
2 |
|
3 |
Added: udisks-1.0.1-no-floppy.patch |
4 |
Log: |
5 |
Fix long hangs on probing nonexistant floppies. |
6 |
(Portage version: 2.2_rc67/cvs/Linux x86_64) |
7 |
|
8 |
Revision Changes Path |
9 |
1.1 sys-fs/udisks/files/udisks-1.0.1-no-floppy.patch |
10 |
|
11 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/udisks/files/udisks-1.0.1-no-floppy.patch?rev=1.1&view=markup |
12 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/udisks/files/udisks-1.0.1-no-floppy.patch?rev=1.1&content-type=text/plain |
13 |
|
14 |
Index: udisks-1.0.1-no-floppy.patch |
15 |
=================================================================== |
16 |
From ca93d4e2d9e7f483b2fde1725da086e2cca44164 Mon Sep 17 00:00:00 2001 |
17 |
From: Martin Pitt <martin.pitt@××××××.com> |
18 |
Date: Wed, 02 Jun 2010 13:56:07 +0000 |
19 |
Subject: Fix long hangs on probing nonexistant floppy drives |
20 |
|
21 |
A lot of modern machines do not have a floppy drive any more, but still have a |
22 |
floppy controller somewhere (or at least the BIOS pretends to). Trying to |
23 |
open(/dev/fd0) on these machines causes long hangs, which lead to long desktop |
24 |
startup times. |
25 |
|
26 |
To fix this, avoid probing floppies for media in update_info(). |
27 |
|
28 |
https://launchpad.net/bugs/539515 |
29 |
--- |
30 |
diff --git a/src/device.c b/src/device.c |
31 |
index 763385c..0e87f1d 100644 |
32 |
--- a/src/device.c |
33 |
+++ b/src/device.c |
34 |
@@ -4471,7 +4471,8 @@ update_info (Device *device) |
35 |
{ |
36 |
media_available = FALSE; |
37 |
|
38 |
- if (!g_udev_device_get_property_as_boolean (device->priv->d, "ID_CDROM")) |
39 |
+ if (!g_udev_device_get_property_as_boolean (device->priv->d, "ID_CDROM") && |
40 |
+ !g_udev_device_get_property_as_boolean (device->priv->d, "ID_DRIVE_FLOPPY")) |
41 |
{ |
42 |
int fd; |
43 |
fd = open (device->priv->device_file, O_RDONLY); |
44 |
-- |
45 |
cgit v0.8.3-6-g21f6 |