[Fstab] Add support for non-network filesystems
ClosedPublic

Authored by bruns on May 3 2019, 4:12 PM.

Details

Summary

Show fuse.encfs and fuse.cryfs file systems

Depends on D20991

Test Plan

solid-hardware list details:

udi = '/org/kde/fstab/fuse.encfs/home/stefan/Vaults/TestVault'
  parent = '/org/kde/fstab'  (string)
  vendor = 'fuse.encfs'  (string)
  product = '~/Vaults/TestVault'  (string)
  description = '~/Vaults/TestVault (fuse.encfs)'  (string)
  icon = 'folder'  (string)
  StorageAccess.accessible = true  (bool)
  StorageAccess.filePath = '/home/stefan/Vaults/TestVault'  (string)
  StorageAccess.ignored = false  (bool)

udi = '/org/kde/fstab/fuse.cryfs/home/stefan/Vaults/CryTest'
  parent = '/org/kde/fstab'  (string)
  vendor = 'fuse.cryfs'  (string)
  product = '~/Vaults/CryTest'  (string)
  description = '~/Vaults/CryTest (fuse.cryfs)'  (string)
  icon = 'folder'  (string)
  StorageAccess.accessible = true  (bool)
  StorageAccess.filePath = '/home/stefan/Vaults/CryTest'  (string)
  StorageAccess.ignored = false  (bool)

Diff Detail

Repository
R245 Solid
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
bruns created this revision.May 3 2019, 4:12 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptMay 3 2019, 4:12 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
bruns requested review of this revision.May 3 2019, 4:12 PM

Nice! Can we make the Places panel display the product rather than the description? I don't think it's necessary to have the fs type listed there in the label. Interested parties can always look that up in the Properties dialog.

bruns added a comment.May 5 2019, 7:07 PM

Nice! Can we make the Places panel display the product rather than the description? I don't think it's necessary to have the fs type listed there in the label. Interested parties can always look that up in the Properties dialog.

The open question is if this should happen in solid or in the panel code ... I have no strong preference here.

ngraham accepted this revision.May 5 2019, 7:28 PM

Hmm yeah, feels like maybe it should happen in the Panel code to use the Product rather than the Description.

This revision is now accepted and ready to land.May 5 2019, 7:28 PM
This revision was automatically updated to reflect the committed changes.
hallas added inline comments.May 6 2019, 3:10 PM
src/solid/devices/backends/fstab/fstabhandling.cpp
126

Why do we limit to these two filesystems? I think it would be really useful to show all kinds of fuse based filesystems, e.g. isofs, sshfs and xrdp-chansrv.

ngraham added inline comments.May 6 2019, 3:20 PM
src/solid/devices/backends/fstab/fstabhandling.cpp
126

Now that the refactoring's been done, it should be easy to add support for those or remove the conditional.

hallas added inline comments.May 6 2019, 3:29 PM
src/solid/devices/backends/fstab/fstabhandling.cpp
126

Yes indeed :D I was just wondering why it was made the way it is? Is there a reason for the limit or was it just because we were only targeting vault type mounts?

bruns added inline comments.May 6 2019, 6:11 PM
src/solid/devices/backends/fstab/fstabhandling.cpp
126

fuse filesystems are just to different to say "just add it and see what breaks". Other types should be added on a strict whitelist basis.