Refactor fstab handling
Needs RevisionPublic

Authored by hallas on Sun, Jan 12, 7:43 AM.

Details

Reviewers
bruns
meven
Group Reviewers
Frameworks
Summary

Refactor fstab handling

Splits the fstab/mtab handling code into smaller pieces and allow unit
testing of each one. The reafacting allows us to use the various classes
individually, e.g. use the FilesystemTableParser for parsing any
fstab/mtab style file.

This refactoring is a prerequisite for adding proper support for
fuseiso, since fuseiso maintains it's own mtab file, which we would like
to parse and use.

Test Plan

Unit tests
Tested manually with Plasma Vaults

Diff Detail

Repository
R245 Solid
Branch
fstabhandling_rewrite
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 20996
Build 21014: arc lint + arc unit
hallas created this revision.Sun, Jan 12, 7:43 AM
Restricted Application added a project: Frameworks. · View Herald TranscriptSun, Jan 12, 7:44 AM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
hallas requested review of this revision.Sun, Jan 12, 7:44 AM

@meven - I am a little unsure if I have broken the fix you have done in commit c97f0b2a3076731b35435f200bd09a22859f3e03 - could you please check?

I have not tested with NFS or SMB mounts.

Finally, I think this code could be moved to a more general library in KDE Frameworks, because it appears that we have this functionality in multiple places. We have at least a partial copy of this in solid/src/solid/devices/backends/hal and probably also other places.

src/solid/devices/backends/fstab/call_system_command.cpp
1

I think the Copyright notice needs to include the original authors of this function

src/solid/devices/backends/fstab/filesystem_table_parser.cpp
2

I think the Copyright notice needs to include the original authors of this function

alexde retitled this revision from Refator fstab handling to Refactor fstab handling.Sat, Jan 18, 1:46 PM
bruns requested changes to this revision.Sat, Jan 18, 3:55 PM

Moving existing code to new files does not make you the copyright owner.

This revision now requires changes to proceed.Sat, Jan 18, 3:55 PM

Moving existing code to new files does not make you the copyright owner.

Yes, sorry about that - I need to fix that. This is just my editor, when I create new files this is the default template. I will make sure to put all the original authors in.