提交 eac6604a 编写于 作者: S stump 提交者: Matt Gajownik

linux-v4l2: Fix bashism in v4l2loopback module detection

When /bin/sh isn't bash, the previous line always appears to succeed,
and modinfo's output is not redirected, because it actually runs
modinfo in the background (which always succeeds) then opens and closes
/dev/null without doing anything to it. This causes us to always think
that the v4l2loopback module is installed, even when it isn't.
上级 842ad178
......@@ -31,7 +31,7 @@ static bool v4l2loopback_installed()
{
bool loaded = false;
int ret = system("modinfo v4l2loopback &>/dev/null");
int ret = system("modinfo v4l2loopback >/dev/null 2>&1");
if (ret == 0)
loaded = true;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册