summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/igt_debugfs.c4
-rw-r--r--lib/igt_debugfs.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/igt_debugfs.c b/lib/igt_debugfs.c
index f1944398..7e625e15 100644
--- a/lib/igt_debugfs.c
+++ b/lib/igt_debugfs.c
@@ -66,12 +66,12 @@ find_minor:
return ENOENT;
}
-int igt_debugfs_open(igt_debugfs_t *debugfs, const char *filename)
+int igt_debugfs_open(igt_debugfs_t *debugfs, const char *filename, int mode)
{
char buf[1024];
sprintf(buf, "%s/%s", debugfs->dri_path, filename);
- return open(buf, O_RDONLY);
+ return open(buf, mode);
}
FILE *igt_debugfs_fopen(igt_debugfs_t *debugfs, const char *filename,
diff --git a/lib/igt_debugfs.h b/lib/igt_debugfs.h
index 1035a933..1ae6bbdf 100644
--- a/lib/igt_debugfs.h
+++ b/lib/igt_debugfs.h
@@ -33,7 +33,7 @@ typedef struct {
} igt_debugfs_t;
int igt_debugfs_init(igt_debugfs_t *debugfs);
-int igt_debugfs_open(igt_debugfs_t *debugfs, const char *filename);
+int igt_debugfs_open(igt_debugfs_t *debugfs, const char *filename, int mode);
FILE *igt_debugfs_fopen(igt_debugfs_t *debugfs, const char *filename,
const char *mode);