Signed-off-by: Damien Lespiau <damien.lespiau@xxxxxxxxx> --- lib/igt_debugfs.c | 9 +++++++++ lib/igt_debugfs.h | 4 ++++ 2 files changed, 13 insertions(+) diff --git a/lib/igt_debugfs.c b/lib/igt_debugfs.c index 33c4fc1..f194439 100644 --- a/lib/igt_debugfs.c +++ b/lib/igt_debugfs.c @@ -73,3 +73,12 @@ int igt_debugfs_open(igt_debugfs_t *debugfs, const char *filename) sprintf(buf, "%s/%s", debugfs->dri_path, filename); return open(buf, O_RDONLY); } + +FILE *igt_debugfs_fopen(igt_debugfs_t *debugfs, const char *filename, + const char *mode) +{ + char buf[1024]; + + sprintf(buf, "%s/%s", debugfs->dri_path, filename); + return fopen(buf, mode); +} diff --git a/lib/igt_debugfs.h b/lib/igt_debugfs.h index aa9449a..1035a93 100644 --- a/lib/igt_debugfs.h +++ b/lib/igt_debugfs.h @@ -25,6 +25,8 @@ #ifndef __IGT_DEBUGFS_H__ #define __IGT_DEBUGFS_H__ +#include <stdio.h> + typedef struct { char root[128]; char dri_path[128]; @@ -32,5 +34,7 @@ typedef struct { int igt_debugfs_init(igt_debugfs_t *debugfs); int igt_debugfs_open(igt_debugfs_t *debugfs, const char *filename); +FILE *igt_debugfs_fopen(igt_debugfs_t *debugfs, const char *filename, + const char *mode); #endif /* __IGT_DEBUGFS_H__ */ -- 1.8.3.1 _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/intel-gfx