Commit 172b30d1 authored by Gleb Popov's avatar Gleb Popov

Do not run ZFS probes if the kernel module is not loaded.

parent a630b22f5ff3
......@@ -26,11 +26,21 @@
#include "zfsprober.h"
#include <sys/param.h>
#include <sys/module.h>
#include <QDebug>
#include <QRegularExpression>
#include <QProcess>
void ZFSProber::run()
{
if(::modfind("zfs") == -1)
{
qDebug() << "Not probing ZFS, the kernel module isn't loaded";
return;
}
QProcess zfsProcess;
QStringList args;
args << QStringLiteral("get") << QStringLiteral("-H") << QStringLiteral("canmount");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment