From: Seth Forshee <seth.forshee@canonical.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: linux-kernel@vger.kernel.org, Seth Forshee <seth.forshee@canonical.com>
Subject: [PATCH] trace-cmd: Add missing mode to open() call
Date: Fri, 20 Jun 2014 13:42:29 -0500 [thread overview]
Message-ID: <1403289749-1631-1-git-send-email-seth.forshee@canonical.com> (raw)
touch_file() calls open(2) with O_CREAT but omits the required
mode argument. Fix this omission.
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
---
trace-record.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/trace-record.c b/trace-record.c
index d3dd0c5..8438388 100644
--- a/trace-record.c
+++ b/trace-record.c
@@ -1995,7 +1995,7 @@ static void touch_file(const char *file)
{
int fd;
- fd = open(file, O_WRONLY | O_CREAT | O_TRUNC);
+ fd = open(file, O_WRONLY | O_CREAT | O_TRUNC, 0644);
if (fd < 0)
die("could not create file %s\n", file);
close(fd);
--
1.9.1
next reply other threads:[~2014-06-20 18:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-20 18:42 Seth Forshee [this message]
2014-06-23 14:19 ` Steven Rostedt
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=1403289749-1631-1-git-send-email-seth.forshee@canonical.com \
--to=seth.forshee@canonical.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rostedt@goodmis.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
all inboxes | Powered by JetHome®