D17910: [UDisks2] Use MediaRemovable to determine if media can be ejected

Stefan Brüns noreply at phabricator.kde.org
Wed Jan 2 01:41:06 GMT 2019


bruns created this revision.
bruns added reviewers: Frameworks, ngraham.
Herald added a project: Frameworks.
Herald added a subscriber: kde-frameworks-devel.
bruns requested review of this revision.

REVISION SUMMARY
  The Ejectable property is mostly useless for card readers and thumb drives.
  It directly exposes a flag from the kernel, e.g. /sys/block/sdX/removable,
  which is the "removable bit" value from the SCSI INQUIRY response.
  
  Unfortunately, most vendors get this wrong, i.e. many thumb drives have
  the removable bit set, while some card readers have it cleared.
  
  The MediaRemovable bit defaults to the same value, but can be overridden
  by setting the ID_DRIVE_THUMB respectively ID_DRIVE_FLASH_{SD,CF,MS}
  properties. UDisks ships a rules file with a large number of devices
  already.
  
  Bug: 402096

TEST PLAN
  Thumb drive - powered down
  Card reader - ejected, stays powered
  External hard driver - powered down

REPOSITORY
  R245 Solid

BRANCH
  submit

REVISION DETAIL
  https://phabricator.kde.org/D17910

AFFECTED FILES
  src/solid/devices/backends/udisks2/udisksstorageaccess.cpp

To: bruns, #frameworks, ngraham
Cc: kde-frameworks-devel, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20190102/c00ba685/attachment.html>


More information about the Kde-frameworks-devel mailing list