]> Cypherpunks repositories - gostls13.git/commitdiff
os: clarify O_TRUNC comment
authorIan Lance Taylor <iant@golang.org>
Thu, 20 Dec 2018 01:49:11 +0000 (17:49 -0800)
committerIan Lance Taylor <iant@golang.org>
Thu, 20 Dec 2018 18:12:51 +0000 (18:12 +0000)
Fixes #28699

Change-Id: Ic340c3171bb7d91d8cb9553967c2b51e7d9daba8
Reviewed-on: https://go-review.googlesource.com/c/155177
Reviewed-by: Bryan C. Mills <bcmills@google.com>
src/os/file.go

index 9b7863e9b6b84a06d181b848357892f9aee2c854..228777c67772f347b47f2eaae47ac0166de8b399 100644 (file)
@@ -73,7 +73,7 @@ const (
        O_CREATE int = syscall.O_CREAT  // create a new file if none exists.
        O_EXCL   int = syscall.O_EXCL   // used with O_CREATE, file must not exist.
        O_SYNC   int = syscall.O_SYNC   // open for synchronous I/O.
-       O_TRUNC  int = syscall.O_TRUNC  // if possible, truncate file when opened.
+       O_TRUNC  int = syscall.O_TRUNC  // truncate regular writable file when opened.
 )
 
 // Seek whence values.