Merge pull request #4406 from lrusak/isengard_backports

kodi: add backported patch for xbmc/xbmc#8334
This commit is contained in:
Stephan Raue 2015-11-02 23:25:41 +01:00
commit d4c5919ccf

View File

@ -0,0 +1,21 @@
diff -Naur kodi-15.2-02e7013.orig/xbmc/storage/linux/UDevProvider.cpp kodi-15.2-02e7013/xbmc/storage/linux/UDevProvider.cpp
--- kodi-15.2-02e7013.orig/xbmc/storage/linux/UDevProvider.cpp 2015-11-02 00:09:55.712632730 -0800
+++ kodi-15.2-02e7013/xbmc/storage/linux/UDevProvider.cpp 2015-11-02 00:11:58.418285333 -0800
@@ -268,14 +268,15 @@
else if (mountpoint)
label = URIUtils::GetFileName(mountpoint);
- if (!strcmp(action, "add") && !strcmp(devtype, "partition"))
+ const char *fs_usage = udev_device_get_property_value(dev, "ID_FS_USAGE");
+ if (mountpoint && strcmp(action, "add") == 0 && (fs_usage && strcmp(fs_usage, "filesystem") == 0))
{
CLog::Log(LOGNOTICE, "UDev: Added %s", mountpoint);
if (callback)
callback->OnStorageAdded(label, mountpoint);
changed = true;
}
- if (!strcmp(action, "remove") && !strcmp(devtype, "partition"))
+ if (strcmp(action, "remove") == 0 && (fs_usage && strcmp(fs_usage, "filesystem") == 0))
{
CLog::Log(LOGNOTICE, "UDev: Removed %s", mountpoint);
if (callback)