]> Cypherpunks repositories - gostls13.git/commitdiff
os: clarify that OpenFile reqires one of O_RDONLY/O_WRONLY/O_RDWR
authorIan Lance Taylor <iant@golang.org>
Mon, 30 Oct 2017 23:31:57 +0000 (16:31 -0700)
committerIan Lance Taylor <iant@golang.org>
Tue, 31 Oct 2017 03:23:10 +0000 (03:23 +0000)
Fixes #21322.

Change-Id: Ia589c576be0b5cdb7cde5d35cd857ad7c93c372b
Reviewed-on: https://go-review.googlesource.com/74550
Reviewed-by: Robert Griesemer <gri@golang.org>
src/os/file.go

index 1fc4cf34da0417b0448ca2f54b85b6e919e041e8..d842ce6ef0002692b213f1b2630166b501a171be 100644 (file)
@@ -60,7 +60,8 @@ var (
 )
 
 // Flags to OpenFile wrapping those of the underlying system. Not all
-// flags may be implemented on a given system.
+// flags may be implemented on a given system. Each call to OpenFile
+// should specify exactly one of O_RDONLY, O_WRONLY, or O_RDWR.
 const (
        O_RDONLY int = syscall.O_RDONLY // open the file read-only.
        O_WRONLY int = syscall.O_WRONLY // open the file write-only.