[Intel-gfx] [PATCH 6/8] lib: Make igt_debugfs_open() take the mode as argument
Damien Lespiau
damien.lespiau at intel.com
Tue Oct 15 20:44:32 CEST 2013
Signed-off-by: Damien Lespiau <damien.lespiau at intel.com>
---
lib/igt_debugfs.c | 4 ++--
lib/igt_debugfs.h | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/igt_debugfs.c b/lib/igt_debugfs.c
index f194439..7e625e1 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 1035a93..1ae6bbd 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);
--
1.8.3.1
More information about the Intel-gfx
mailing list