From: Damien Lespiau Date: Wed, 9 Oct 2013 22:53:15 +0000 (+0100) Subject: lib: Make igt_debugfs_open() take the mode as argument X-Git-Tag: intel-gpu-tools-1.5~95 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d4e7ddf15d69fdb17d25446edcd6c73a684b759b;p=profile%2Fextras%2Fintel-gpu-tools.git lib: Make igt_debugfs_open() take the mode as argument Signed-off-by: Damien Lespiau --- 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);