lvm: disable error channel for vgs/pvs commands.
Having an error channel can result in unwanted devices, e.g.: "/dev//dev/mapper/test: read failed after 0 of 4096 at 0: Input/output error"
This commit is contained in:
parent
4a39e453dc
commit
0badfebcb1
|
@ -299,7 +299,7 @@ QString LvmDevice::getField(const QString& fieldName, const QString& vgName)
|
|||
if (!vgName.isEmpty()) {
|
||||
args << vgName;
|
||||
}
|
||||
ExternalCommand cmd(QStringLiteral("lvm"), args);
|
||||
ExternalCommand cmd(QStringLiteral("lvm"), args, QProcess::ProcessChannelMode::SeparateChannels);
|
||||
if (cmd.run(-1) && cmd.exitCode() == 0) {
|
||||
return cmd.output().trimmed();
|
||||
}
|
||||
|
|
|
@ -242,7 +242,7 @@ QString lvm2_pv::getpvField(const QString& fieldName, const QString& deviceNode
|
|||
if (!deviceNode.isEmpty()) {
|
||||
args << deviceNode;
|
||||
}
|
||||
ExternalCommand cmd(QStringLiteral("lvm"), args);
|
||||
ExternalCommand cmd(QStringLiteral("lvm"), args, QProcess::ProcessChannelMode::SeparateChannels);
|
||||
if (cmd.run(-1) && cmd.exitCode() == 0) {
|
||||
return cmd.output().trimmed();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue