提交 36d3f7d8 编写于 作者: S Shuah Khan

selftests: media_dcevice_test fix to handle ioctl failure case

Fix to print information returned by ioctl only when
it returns success.
Signed-off-by: NShuah Khan <shuahkh@osg.samsung.com>
上级 3b48bfc0
......@@ -86,8 +86,9 @@ int main(int argc, char **argv)
ret = ioctl(fd, MEDIA_IOC_DEVICE_INFO, &mdi);
if (ret < 0)
printf("Media Device Info errno %s\n", strerror(errno));
printf("Media device model %s driver %s\n",
mdi.model, mdi.driver);
else
printf("Media device model %s driver %s\n",
mdi.model, mdi.driver);
sleep(10);
count++;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册