mirror of
https://github.com/cmclark00/retro-imager.git
synced 2025-05-18 07:55:21 +01:00
Fix timeout on systems with large numbers of loops
On systems with a very large number of snap packages installed, there are a considerable number of loop devices. In this case, the `lsblk` command in linuxdrivelist fills the stdout pipe, blocks, and the rpi-imager process assumes it has timed out [1]. This is a trivial work-around that simply excludes loop devices (major=7) from the `lsblk` output. Given subsequent code excludes everything starting with `/dev/loop` anyway, there should be no change in user experience with this exclusion. [1]: https://github.com/waveform80/imager-snap/issues/6
This commit is contained in:
parent
f79a6874d8
commit
b00815058f
1 changed files with 1 additions and 1 deletions
|
@ -48,7 +48,7 @@ namespace Drivelist
|
||||||
std::vector<DeviceDescriptor> deviceList;
|
std::vector<DeviceDescriptor> deviceList;
|
||||||
|
|
||||||
QProcess p;
|
QProcess p;
|
||||||
QStringList args = { "--bytes", "--json", "--paths", "--output-all" };
|
QStringList args = { "--bytes", "--json", "--paths", "--output-all", "--exclude", "7" };
|
||||||
p.start("lsblk", args);
|
p.start("lsblk", args);
|
||||||
p.waitForFinished(2000);
|
p.waitForFinished(2000);
|
||||||
QByteArray output = p.readAll();
|
QByteArray output = p.readAll();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue