Skip to content
Snippets Groups Projects
Commit d1ae4707d4a5 authored by Gleb Popov's avatar Gleb Popov
Browse files

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

parent a630b22f5ff3
No related branches found
Tags 0.17
No related merge requests found
......@@ -26,8 +26,12 @@
#include "zfsprober.h"
#include <sys/param.h>
#include <sys/module.h>
#include <QDebug>
#include <QRegularExpression>
#include <QProcess>
void ZFSProber::run()
{
......@@ -29,8 +33,14 @@
#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");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment