diff options
author | Enji Cooper <ngie@FreeBSD.org> | 2017-05-28 17:50:29 +0000 |
---|---|---|
committer | Enji Cooper <ngie@FreeBSD.org> | 2017-05-28 17:50:29 +0000 |
commit | 71784da9b195664c5a3e443c3b8d8d5bec72c4c9 (patch) | |
tree | d2fce696a6824a759c0acdb583738e5acddc8ad0 | |
parent | 03222757517395fd7174b8db4e0b5304361eea0f (diff) | |
download | src-71784da9b195664c5a3e443c3b8d8d5bec72c4c9.tar.gz src-71784da9b195664c5a3e443c3b8d8d5bec72c4c9.zip |
Tweak r319058 slightly
- Specify an explicit mode when using O_CREAT per open(2).
- Fix the error message (add missing enclosing parentheses).
Submitted by: jilles
MFC after: 3 days
MFC with: r319058
Sponsored by: Dell EMC Isilon
Notes
Notes:
svn path=/head/; revision=319078
-rw-r--r-- | tests/sys/file/ftruncate_test.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/sys/file/ftruncate_test.c b/tests/sys/file/ftruncate_test.c index e3fd8bd20cd9..18bdb5a02884 100644 --- a/tests/sys/file/ftruncate_test.c +++ b/tests/sys/file/ftruncate_test.c @@ -75,9 +75,9 @@ main(void) * Save a read-only reference to the file to use later for read-only * descriptor tests. */ - fd = open(path, O_RDWR|O_CREAT); + fd = open(path, O_RDWR|O_CREAT, 0600); if (fd < 0) - err(1, "open(%s, O_RDWR|O_CREAT", path); + err(1, "open(%s, O_RDWR|O_CREAT, 0600)", path); read_only_fd = open(path, O_RDONLY); if (read_only_fd < 0) { error = errno; |