[Kde-hardware-devel] Review Request: Fix removable property in soliddevice dataengine with HAL backend (on FreeBSD)

Alberto Villa avilla at freebsd.org
Wed Sep 12 17:00:31 UTC 2012



> On Sept. 12, 2012, 2:20 p.m., Alex Fiestas wrote:
> > From where I stand, I see HAL as the official backend for freeBSD, no modern linux distro (or any distro that will update their libsolid version) is shipping with HAL.
> > 
> > So, if with this patch freeBSD support is better, please go ahead!

Andriy Gapon submitted an equivalent review request time ago: https://git.reviewboard.kde.org/r/105432
It solves the same issue (I was not aware of it), introducing a function which was proposed for the Solid API. Apart from the specific code, for which you seem to trust our judgement, what's your preferred approach? I admit that at this very moment I am not aware of other places which require that function, but I guess there could be some (I may have seen one where CD drives need to address their parent storage drive).

By the way, would you approve a change to set both individual Removable and Hotpluggable properties? This would make the dataengine more consistent, while it's the plasmoid which has to check for both the properties to identify removable devices (I've read the HAL spec - which I think can be a reliable reference for those properties - and yes, one should not be set when the other one is, so we're handling them in the wrong way).


- Alberto


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/106378/#review18899
-----------------------------------------------------------


On Sept. 8, 2012, 12:26 a.m., Alberto Villa wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/106378/
> -----------------------------------------------------------
> 
> (Updated Sept. 8, 2012, 12:26 a.m.)
> 
> 
> Review request for Solid.
> 
> 
> Description
> -------
> 
> Current hack to check for removable property in StorageAccess devices goes up only one level to search for the StorageDrive device. This works fine with UDev, but not with HAL, which can have (at least on FreeBSD, where I'm testing it) a StorageVolume device in the middle. Going up the whole tree of the Block device ensures that we eventually get to the StorageDrive one to fetch the correct removable property.
> 
> While here, I'd like to ask why only removable is set (in a not so convincing way, as a removable device can be non-hotpluggable as far as I know) instead of both removable and hotpluggable, as done few lines above.
> 
> If approved, I'd like to commit this also to 4.9.
> 
> 
> Diffs
> -----
> 
>   plasma/generic/dataengines/soliddevice/soliddeviceengine.cpp 86f123c 
> 
> Diff: http://git.reviewboard.kde.org/r/106378/diff/
> 
> 
> Testing
> -------
> 
> Tested successfully on FreeBSD 10-CURRENT r239665 with KDE SC 4.9.0: my USB flash drives now appear in the device notifier plasmoid (and a console.log() in the plasmoid itself confirms that the device now has the Removable property).
> 
> I also double-checked with a UDev-backed `solid-hardware list details` log that the logic correctly applies to UDev.
> 
> 
> Thanks,
> 
> Alberto Villa
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-hardware-devel/attachments/20120912/38464cae/attachment.html>


More information about the Kde-hardware-devel mailing list