From baae3c76417cde5c7a38b37400a016f7e7cdb5d1 Mon Sep 17 00:00:00 2001 From: Tom Dewey Date: Wed, 31 Jul 2024 13:34:17 +0100 Subject: [PATCH] linux drivelist: Trim lsblk output Rather than using all possible output from lsblk - which in testing produces ~45k of output on Raspberry Pi 5 running Bookworm, instead constrain to just the fields we actually use - just over 8k on the same system. --- src/linux/linuxdrivelist.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/linux/linuxdrivelist.cpp b/src/linux/linuxdrivelist.cpp index 85e0549..f97920a 100644 --- a/src/linux/linuxdrivelist.cpp +++ b/src/linux/linuxdrivelist.cpp @@ -48,7 +48,13 @@ namespace Drivelist std::vector deviceList; QProcess p; - QStringList args = { "--bytes", "--json", "--paths", "--output-all", "--exclude", "7" }; + QStringList args = { + "--bytes", + "--json", + "--paths", + "--output", "kname,type,subsystems,ro,rm,hotplug,size,phy-sec,log-sec,label,vendor,model,mountpoint", + "--exclude", "7" + }; p.start("lsblk", args); p.waitForFinished(2000); QByteArray output = p.readAll();