From ab54de9937678583437eee4546bc25a9885b87a6 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Fri, 26 Apr 2019 16:55:40 +0300 Subject: lib/igt_audio: fix filemode not specified in open(O_CREAT) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit open(3) takes va_args after the flags and O_CREAT will read the first one. If we don't provide one, this is undefined behaviour. (Someone reported it broke the build for them) Signed-off-by: Simon Ser Fixes: 311baff151f9 ("tests/kms_chamelium: add dp-audio test") Reviewed-by: Chris Wilson Signed-off-by: Ville Syrjälä --- lib/igt_audio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/igt_audio.c b/lib/igt_audio.c index 5b0860e6..fd8cf07c 100644 --- a/lib/igt_audio.c +++ b/lib/igt_audio.c @@ -447,7 +447,7 @@ int audio_create_wav_file_s32_le(const char *qualifier, uint32_t sample_rate, *path = strdup(_path); igt_debug("Dumping %s audio to %s\n", qualifier, _path); - fd = open(_path, O_WRONLY | O_CREAT | O_TRUNC); + fd = open(_path, O_WRONLY | O_CREAT | O_TRUNC, 0644); if (fd < 0) { igt_warn("open failed: %s\n", strerror(errno)); return -1; -- cgit v1.2.3