LM (Linux): fix gdm version detection on Ubuntu

This commit is contained in:
李通洲
2023-07-30 00:36:47 +08:00
parent b3f8798f73
commit 4f54eab672
+9 -2
View File
@@ -16,8 +16,15 @@ static const char* getGdmVersion(FFstrbuf* version)
"--version",
NULL
});
if (error)
return error;
if (error || version->length == 0)
{
error = ffProcessAppendStdOut(version, (char* const[]) {
"gdm3",
"--version",
NULL
});
if (error || version->length == 0) return "Failed to get GDM version";
}
// GDM 44.1
ffStrbufSubstrAfterFirstC(version, ' ');