Blame Dont-try-to-mount-null-devices.patch
|
Eric Christensen |
0f5209d |
From d79cb9f5e693015eab0c9707da96fc3eb761b209 Mon Sep 17 00:00:00 2001
|
|
Eric Christensen |
0f5209d |
From: =?UTF-8?q?Andr=C3=A9s=20G=2E=20Aragoneses?= <knocte@gmail.com>
|
|
Eric Christensen |
0f5209d |
Date: Wed, 19 Mar 2014 02:37:03 +0100
|
|
Eric Christensen |
0f5209d |
Subject: [PATCH] Gio: don't try to mount null devices (bgo#726147)
|
|
Eric Christensen |
0f5209d |
|
|
Eric Christensen |
0f5209d |
The log in bgo#726147 can tell us that we were forgetting a null
|
|
Eric Christensen |
0f5209d |
check in HandleMonitorMountAdded(). Turns out we had a similar
|
|
Eric Christensen |
0f5209d |
null check a bit later in this file in the VolumeRemoved() method,
|
|
Eric Christensen |
0f5209d |
which I copy-pasted here just by replacing the "unmount" word in
|
|
Eric Christensen |
0f5209d |
the log statement with "mount" in this case.
|
|
Eric Christensen |
0f5209d |
---
|
|
Eric Christensen |
0f5209d |
src/Backends/Banshee.Gio/Banshee.Hardware.Gio/LowLevel/Manager.cs | 5 +++++
|
|
Eric Christensen |
0f5209d |
1 file changed, 5 insertions(+)
|
|
Eric Christensen |
0f5209d |
|
|
Eric Christensen |
0f5209d |
diff --git a/src/Backends/Banshee.Gio/Banshee.Hardware.Gio/LowLevel/Manager.cs b/src/Backends/Banshee.Gio/Banshee.Hardware.Gio/LowLevel/Manager.cs
|
|
Eric Christensen |
0f5209d |
index f1ff6c4..f635b93 100644
|
|
Eric Christensen |
0f5209d |
--- a/src/Backends/Banshee.Gio/Banshee.Hardware.Gio/LowLevel/Manager.cs
|
|
Eric Christensen |
0f5209d |
+++ b/src/Backends/Banshee.Gio/Banshee.Hardware.Gio/LowLevel/Manager.cs
|
|
Eric Christensen |
0f5209d |
@@ -78,6 +78,11 @@ void HandleMonitorMountAdded (object o, MountAddedArgs args)
|
|
Eric Christensen |
0f5209d |
return;
|
|
Eric Christensen |
0f5209d |
|
|
Eric Christensen |
0f5209d |
var device = GudevDeviceFromGioMount (mount);
|
|
Eric Christensen |
0f5209d |
+ if (device == null) {
|
|
Eric Christensen |
0f5209d |
+ Hyena.Log.Debug (string.Format ("Tried to mount {0}/{1} with no matching udev device", mount.Volume.Name, mount.Volume.Uuid));
|
|
Eric Christensen |
0f5209d |
+ return;
|
|
Eric Christensen |
0f5209d |
+ }
|
|
Eric Christensen |
0f5209d |
+
|
|
Eric Christensen |
0f5209d |
volume_device_map [mount.Volume.Handle] = device;
|
|
Eric Christensen |
0f5209d |
var h = DeviceAdded;
|
|
Eric Christensen |
0f5209d |
if (h != null) {
|
|
Eric Christensen |
0f5209d |
--
|
|
Eric Christensen |
0f5209d |
1.9.3
|