Add support for O_TRUNC with nfs_open()
authorRonnie Sahlberg <ronniesahlberg@gmail.com>
Sun, 2 Feb 2014 20:16:07 +0000 (12:16 -0800)
committerRonnie Sahlberg <ronniesahlberg@gmail.com>
Sun, 2 Feb 2014 20:16:07 +0000 (12:16 -0800)
O_TRUNC will attempt to truncate the file when opened with O_RDWR
or O_WRONLY.

Normal posix open(O_RDONLY|O_TRUNC) is undefined.

libnfs nfs_open() only uses the O_TRUNC flag when used in combination with either O_RDWR or O_WRONLY.
When O_TRUNC is used together with O_RDONLY libnfs will silently ignore the O_TRUNC flag.

Libnfs nfs_open(O_RDONLY|O_TRUNC) is thus the same as nfs_open(O_RDONLY)


No differences found