[Intel-gfx] [PATCH i-g-t] lib: fix igt_reset_connectors
Thomas Wood
thomas.wood at intel.com
Mon Nov 24 15:16:25 CET 2014
Use igt_debugfs_open to open the connector file, since the
forced_connectors array now only stores the connector path relative to
the debugfs path. Also add some extra error checking to ensure a test
failure if the reset fails.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=85829
Signed-off-by: Thomas Wood <thomas.wood at intel.com>
---
lib/igt_kms.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index 5edd5ec..cba0c27 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -1773,8 +1773,8 @@ void igt_reset_connectors(void)
* functions that are not safe to call in signal handlers */
for (tmp = forced_connectors; *tmp; tmp++) {
- int fd = open(*tmp, O_WRONLY | O_TRUNC);
- write(fd, "unspecified", 11);
+ int fd = igt_debugfs_open(*tmp, O_WRONLY | O_TRUNC);
+ igt_assert(write(fd, "unspecified", 11) == 11);
close(fd);
}
}
--
2.1.0
More information about the Intel-gfx
mailing list