summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authormaxim <maxim@FreeBSD.org>2006-06-01 14:20:43 +0000
committermaxim <maxim@FreeBSD.org>2006-06-01 14:20:43 +0000
commit38d68c5332a52193f6eddf74862cfe8deeb8fc8a (patch)
treed54ef265fc798d98d3a5271f23a973b06043edcc /lib
parent6a0be273a2ddebacf732e07b11c607a5451e56f2 (diff)
downloadFreeBSD-src-38d68c5332a52193f6eddf74862cfe8deeb8fc8a.zip
FreeBSD-src-38d68c5332a52193f6eddf74862cfe8deeb8fc8a.tar.gz
o Document the fact truncate(2) has no effect for !VDIR or !VREG files.
Submitted by: ceri
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/sys/truncate.26
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/libc/sys/truncate.2 b/lib/libc/sys/truncate.2
index 08cc947..29f04b2 100644
--- a/lib/libc/sys/truncate.2
+++ b/lib/libc/sys/truncate.2
@@ -32,7 +32,7 @@
.\" @(#)truncate.2 8.1 (Berkeley) 6/4/93
.\" $FreeBSD$
.\"
-.Dd June 4, 1993
+.Dd June 1, 2006
.Dt TRUNCATE 2
.Os
.Sh NAME
@@ -69,6 +69,10 @@ With
the file must be open for writing.
.Sh RETURN VALUES
.Rv -std
+If the file to be modified is not a directory or
+a regular file, the
+.Fn truncate
+call has no effect and returns the value 0.
.Sh ERRORS
The
.Fn truncate
OpenPOWER on IntegriCloud