svn commit: r319078 - head/tests/sys/file

Ngie Cooper ngie at FreeBSD.org
Sun May 28 17:50:30 UTC 2017


Author: ngie
Date: Sun May 28 17:50:29 2017
New Revision: 319078
URL: https://svnweb.freebsd.org/changeset/base/319078

Log:
  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

Modified:
  head/tests/sys/file/ftruncate_test.c

Modified: head/tests/sys/file/ftruncate_test.c
==============================================================================
--- head/tests/sys/file/ftruncate_test.c	Sun May 28 17:48:54 2017	(r319077)
+++ head/tests/sys/file/ftruncate_test.c	Sun May 28 17:50:29 2017	(r319078)
@@ -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;


More information about the svn-src-all mailing list