Add support for Minix(Mini Unix) Filesystem
ClosedPublic

Authored by shubham on Jun 7 2019, 5:57 PM.

Diff Detail

Repository
R16 KPMCore
Branch
minix
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 12536
Build 12554: arc lint + arc unit
shubham requested review of this revision.Jun 7 2019, 5:57 PM
shubham created this revision.
shubham updated this revision to Diff 59355.Jun 7 2019, 5:58 PM

Remove redundant includes

shubham added a project: KDE Partition Manager.
shubham added a subscriber: KDE Partition Manager.
stikonas requested changes to this revision.Jun 7 2019, 6:04 PM

Looks good, just keep space consistent where I mentioned. Then you can push this to master branch.

src/fs/filesystem.cpp
75

let's be consistent with other entries above and not add space before 50

This revision now requires changes to proceed.Jun 7 2019, 6:04 PM
shubham updated this revision to Diff 59359.Jun 7 2019, 6:38 PM
shubham marked an inline comment as done.

Whitespace consistency

stikonas accepted this revision.Jun 7 2019, 6:45 PM
This revision is now accepted and ready to land.Jun 7 2019, 6:45 PM
shubham updated this revision to Diff 59369.Jun 7 2019, 8:09 PM

Remove redundant include

cjlcarvalho requested changes to this revision.Jun 7 2019, 11:38 PM
cjlcarvalho added a subscriber: cjlcarvalho.

You will need to add fsck.minix to our command whitelist.

This revision now requires changes to proceed.Jun 7 2019, 11:38 PM
cjlcarvalho added inline comments.Jun 7 2019, 11:39 PM
src/fs/minix.cpp
85

And mkfs.minix as well.

shubham updated this revision to Diff 59380.Jun 8 2019, 5:34 AM

Add mkfs.minix and fsck.minix to externalcommand_whitelist.h

shubham marked an inline comment as done.Jun 8 2019, 5:34 AM
shubham added a comment.EditedJun 8 2019, 6:06 AM

Thread 8 "m_DeviceScanner" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffca6df700 (LWP 4074)]
0x00007ffff5934148 in vtable for QTreeWidgetItem () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
(gdb) bt
#0 0x00007ffff5934148 in vtable for QTreeWidgetItem () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#1 0x00007ffff447e9d2 in QObject::connect(QObject const*, char const*, QObject const*, char const*, Qt::ConnectionType) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#2 0x00007ffff7b85d85 in ExternalCommand::copyBlocks(CopySource const&, CopyTarget&) (this=this@entry=0x7fffca6de8b0, source=..., target=...) at /home/aryan/kde/src/kpmcore/src/util/externalcommand.cpp:185
#3 0x00007fffddf01e0e in SfdiskBackend::updateDevicePartitionTable(Device&, QJsonObject const&) (this=this@entry=0x5555558fe8d0, d=..., jsonPartitionTable=...)

at /home/aryan/kde/src/kpmcore/src/plugins/sfdisk/sfdiskbackend.cpp:364

#4 0x00007fffddf04a4e in SfdiskBackend::scanDevice(QString const&) (this=0x5555558fe8d0, deviceNode=...) at /home/aryan/kde/src/kpmcore/src/plugins/sfdisk/sfdiskbackend.cpp:212
#5 0x00007fffddf017e7 in SfdiskBackend::scanDevices(QFlags<ScanFlag>) (this=0x5555558fe8d0, scanFlags=...) at /home/aryan/kde/src/kpmcore/src/plugins/sfdisk/sfdiskbackend.cpp:115
#6 0x00007ffff7b37106 in DeviceScanner::scan() (this=0x5555558f6920) at /home/aryan/kde/src/kpmcore/src/core/devicescanner.cpp:66
#7 0x00007ffff4270bc2 in () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#8 0x00007ffff04a46db in start_thread (arg=0x7fffca6df700) at pthread_create.c:463
#9 0x00007ffff3b7088f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
(gdb) thread 0
Invalid thread ID: 0
(gdb) thread 1
[Switching to thread 1 (Thread 0x7ffff7fa5840 (LWP 4005))]
#0 0x00007ffff3b5f0b4 in GI_libc_read (fd=5, buf=0x7fffffffd850, nbytes=16) at ../sysdeps/unix/sysv/linux/read.c:27

This is the backtrace for the segmentation fault.
@stikonas @cjlcarvalho Any help?

stikonas added inline comments.Jun 8 2019, 8:53 AM
src/fs/filesystemfactory.cpp
90

This lists seems to be in alphabetical order (I think the only reason is to be able to find entries easier but let's keep it alphabetically)

stikonas added inline comments.Jun 8 2019, 8:54 AM
src/fs/filesystemfactory.cpp
90

Actually, did you mean Apfs here? MIght be cause of crash.

shubham updated this revision to Diff 59389.Jun 8 2019, 10:00 AM

Made suggested changes

stikonas requested changes to this revision.Jun 8 2019, 4:46 PM
stikonas added inline comments.
src/fs/minix.cpp
64

Fix this

This revision now requires changes to proceed.Jun 8 2019, 4:46 PM
shubham updated this revision to Diff 59412.Jun 8 2019, 5:11 PM
shubham marked an inline comment as done.

Correct tool name and website

stikonas requested changes to this revision.Jun 8 2019, 5:25 PM
stikonas added inline comments.
src/fs/minix.cpp
52

Fix this. Don't check for tools that do not exist or we don't expect to exit.

E.g. m_Shrink is cmdSupportNone and this prints warning.

This revision now requires changes to proceed.Jun 8 2019, 5:25 PM
stikonas added inline comments.Jun 8 2019, 5:45 PM
src/plugins/sfdisk/sfdiskbackend.cpp
465

remove trailing whitespace here too

stikonas added inline comments.Jun 8 2019, 5:53 PM
src/fs/minix.cpp
42–43
m_Check = findExternal(QStringLiteral("fsck.minix"), {}, 16) ? cmdSupportFileSystem : cmdSupportNone;
m_Create = findExternal(QStringLiteral("mkfs.minix"), {}, 16) ? cmdSupportFileSystem : cmdSupportNone
shubham updated this revision to Diff 59415.Jun 8 2019, 6:13 PM
shubham marked 3 inline comments as done.

Make requested changes

stikonas accepted this revision.Jun 8 2019, 6:15 PM
This revision was not accepted when it landed; it landed in state Needs Review.Jun 8 2019, 6:31 PM
This revision was automatically updated to reflect the committed changes.