From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH] mtest06: Use temp dir from $TMPDIR if present
Date: Thu, 8 Mar 2018 15:07:23 +0100 [thread overview]
Message-ID: <20180308140722.GA26706@rei> (raw)
In-Reply-To: <20180308005250.210404-1-hridya@google.com>
Hi!
Good catch, but given that the temporary directory created by
tst_tmpdir() is unique we can as well drop the whole mkstemp()
and replace it with just open().
#define FNAME "ashfile"
int mkfile(int size)
{
int fd;
fd = open(FNAME, O_RDWR | O_CREAT, 0600);
if (fd < 0)
tst_brk(...);
unlink(FNAME);
...
return fd;
}
--
Cyril Hrubis
chrubis@suse.cz
prev parent reply other threads:[~2018-03-08 14:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-08 0:52 [LTP] [PATCH] mtest06: Use temp dir from $TMPDIR if present Hridya Valsaraju
2018-03-08 14:07 ` Cyril Hrubis [this message]
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=20180308140722.GA26706@rei \
--to=chrubis@suse.cz \
--cc=ltp@lists.linux.it \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.