lib/igt_debugfs: Remove debugfs from igt_debugfs_fopen

Also add a missing igt_assert to kms_fbc_crc and again add the missing
Returns: section to the api doc.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
Daniel Vetter
2014-03-16 14:46:39 +01:00
parent f04f17bcd4
commit 9a7609a8e4
4 changed files with 16 additions and 7 deletions
+4 -2
View File
@@ -239,7 +239,9 @@ static bool fbc_enabled(data_t *data)
FILE *status;
char str[64] = {};
status = igt_debugfs_fopen(&data->debugfs, "i915_fbc_status", "r");
status = igt_debugfs_fopen("i915_fbc_status", "r");
igt_assert(status);
fread(str, sizeof(str) - 1, 1, status);
fclose(status);
return strstr(str, "FBC enabled") != NULL;
@@ -494,7 +496,7 @@ igt_main
igt_debugfs_init(&data.debugfs);
igt_pipe_crc_check(&data.debugfs);
status = igt_debugfs_fopen(&data.debugfs, "i915_fbc_status", "r");
status = igt_debugfs_fopen("i915_fbc_status", "r");
igt_require_f(status, "No i915_fbc_status found\n");
fread(buf, sizeof(buf), 1, status);
fclose(status);
+1 -1
View File
@@ -43,7 +43,7 @@ static void test_bad_command(data_t *data, const char *cmd)
FILE *ctl;
size_t written;
ctl = igt_debugfs_fopen(&data->debugfs, "i915_display_crc_ctl", "r+");
ctl = igt_debugfs_fopen("i915_display_crc_ctl", "r+");
written = fwrite(cmd, 1, strlen(cmd), ctl);
fflush(ctl);
igt_assert_cmpint(written, ==, (strlen(cmd)));