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
This commit is contained in:
parent
0322275751
commit
71784da9b1
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=319078
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user