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
1de50b64b4
commit
aed6c7c421
@ -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…
x
Reference in New Issue
Block a user