Commit 2962c516 authored by Chris Wilson's avatar Chris Wilson

lib/debugfs: Adjust path creation for opening /debugfs/.../dir/%d

Signed-off-by: Chris Wilson's avatarChris Wilson <chris@chris-wilson.co.uk>
parent 611d1e53
......@@ -817,6 +817,7 @@ int igt_debugfs_dir(int fd)
if (fstat(fd, &st) || !S_ISCHR(st.st_mode))
return -1;
sprintf(path, "%s/%d", __debugfs_mount(), (int)(st.st_rdev & 0xff));
sprintf(path, "%s/dri/%d", __debugfs_mount(), (int)(st.st_rdev & 0xff));
igt_debug("Opening debugfs dir %s\n", path);
return open(path, O_RDONLY);
}
......@@ -184,6 +184,7 @@ static void test_debugfs_read(int fd)
DIR *dirp = fdopendir(dir);
struct dirent *de;
igt_assert(dirp);
while ((de = readdir(dirp))) {
struct stat st;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment