diff options
| author | Maciej Kisielewski <maciej.kisielewski@canonical.com> | 2018-03-15 12:16:12 +0100 |
|---|---|---|
| committer | Maciej Kisielewski <maciej.kisielewski@canonical.com> | 2018-03-15 12:16:12 +0100 |
| commit | b6713459e8b33a5541343ca5f223f1d0a767b29f (patch) | |
| tree | 4d05ab57dc64deddec5651c402dddbd173a3a13c | |
| parent | ba32e7e008e461261f682d65779a5ee296c9a156 (diff) | |
don't require 'partition' record for mounted filesystems
On some systems udisks2 doesn't yield the (...).partition record. If the change detected is a new mounted filesystem, I think we should treat it as a drive insertion. Fixes: LP:1755402 Signed-off-by: Maciej Kisielewski <maciej.kisielewski@canonical.com>
| -rwxr-xr-x | bin/removable_storage_watcher | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/bin/removable_storage_watcher b/bin/removable_storage_watcher index 522e7a8b..d5a07221 100755 --- a/bin/removable_storage_watcher +++ b/bin/removable_storage_watcher @@ -619,6 +619,10 @@ class UDisks2StorageDeviceListener: and record.value.prop_name == "MountPoints" and record.value.prop_value != []): found.add('mounted') + # On some systems partition are reported as mounted + # filesystems, without 'partition' record + if set(['partition', 'mounted']).issubset(needs): + needs.remove('partition') # Finally memorize the drive the block device belongs to elif (record.value.iface_name == "org.freedesktop.UDisks2.Block" |
