From: franck.jullien@gmail.com
To: barebox@lists.infradead.org
Subject: [PATCH] scripts/bareboximd: add mode argument to open call
Date: Tue, 10 Mar 2020 11:43:48 +0100 [thread overview]
Message-ID: <20200310104348.29155-1-franck.jullien@gmail.com> (raw)
From: Franck Jullien <franck.jullien@gmail.com>
Newer gcc complain about missing mode argument when a new file is
created. This is an extract of man-pages:
"The mode argument specifies the file mode bits be applied when
a new file is created. This argument must be supplied when
O_CREAT or O_TMPFILE is specified in flags"
Signed-off-by: Franck Jullien <franck.jullien@gmail.com>
---
scripts/bareboximd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/bareboximd.c b/scripts/bareboximd.c
index e5000e0ae..b332d435a 100644
--- a/scripts/bareboximd.c
+++ b/scripts/bareboximd.c
@@ -59,7 +59,7 @@ static int write_file(const char *filename, const void *buf, size_t size)
int fd, ret;
int now;
- fd = open(filename, O_WRONLY | O_TRUNC | O_CREAT);
+ fd = open(filename, O_WRONLY | O_TRUNC | O_CREAT, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
if (fd < 0)
return fd;
--
2.17.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next reply other threads:[~2020-03-10 10:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-10 10:43 franck.jullien [this message]
2020-03-11 15:09 ` Sascha Hauer
2020-03-11 19:42 ` Franck Jullien
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200310104348.29155-1-franck.jullien@gmail.com \
--to=franck.jullien@gmail.com \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox