提交 380f884a 编写于 作者: jia zhang's avatar jia zhang

rune/libenclave/skeleton: Fix detection of sgx device

Use st_rdev to retrieve the major number of device.
Signed-off-by: jia zhang's avatarJia Zhang <zhang.jia@linux.alibaba.com>
上级 86a6493e
......@@ -39,7 +39,7 @@ static bool is_sgx_device(const char *dev)
rc = stat(dev, &st);
if (!rc) {
if ((st.st_mode & S_IFCHR) && (major(st.st_dev) == 10))
if ((st.st_mode & S_IFCHR) && (major(st.st_rdev) == 10))
return true;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册