lib: fix fopen mode in igt_debugfs_search

Reported-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
This commit is contained in:
Thomas Wood 2015-09-25 09:36:34 +01:00
parent 6c89204da7
commit 93f1250013

View File

@ -228,7 +228,7 @@ bool igt_debugfs_search(const char *filename, const char *substring)
char *line = NULL;
bool matched = false;
file = igt_debugfs_fopen(filename, O_RDONLY);
file = igt_debugfs_fopen(filename, "r");
igt_assert(file);
while (getline(&line, &n, file) >= 0) {