summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Wood <thomas.wood@intel.com>2014-11-24 14:16:25 +0000
committerDaniel Vetter <daniel.vetter@ffwll.ch>2014-11-25 09:35:18 +0100
commitdad4694b004a65455523abbb0c7f9839d7125dae (patch)
tree4d8a9bd0f3be5334c86a7a83c2b89e474dc32b0b
parent57259d714d3fe1170cf931af72648219856a9918 (diff)
lib: fix igt_reset_connectors
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@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
-rw-r--r--lib/igt_kms.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index 5edd5ec5..cba0c27a 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);
}
}