Date: Thu, 1 Jun 2006 11:06:17 +0100 From: Ceri Davies <ceri@submonkey.net> To: Maxim Konovalov <maxim@macomnet.ru> Cc: Greg 'groggy' Lehey <grog@FreeBSD.org>, cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/ufs/ufs ufs_vnops.c Message-ID: <20060601100617.GW21998@submonkey.net> In-Reply-To: <20060601135855.I24680@mp2.macomnet.net> References: <200605311315.k4VDFUhD093628@repoman.freebsd.org> <20060601023523.GA80617@wantadilla.lemis.com> <20060601094950.GU21998@submonkey.net> <20060601135855.I24680@mp2.macomnet.net>
next in thread | previous in thread | raw e-mail | index | archive | help
--3E9L5busH6ECpa9r Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jun 01, 2006 at 02:00:00PM +0400, Maxim Konovalov wrote: > On Thu, 1 Jun 2006, 10:49+0100, Ceri Davies wrote: >=20 > > On Thu, Jun 01, 2006 at 12:05:23PM +0930, Greg 'groggy' Lehey wrote: > > > On Wednesday, 31 May 2006 at 13:15:29 +0000, Maxim Konovalov wrote: > > > > maxim 2006-05-31 13:15:29 UTC > > > > > > > > FreeBSD src repository > > > > > > > > Modified files: > > > > sys/ufs/ufs ufs_vnops.c > > > > Log: > > > > o According to POSIX, the result of ftruncate(2) is unspecified > > > > for file types other than VREG, VDIR and shared memory objects. > > > > We already handle VREG, VLNK and VDIR cases. Silently ignore > > > > > > > > Revision Changes Path > > > > 1.276 +22 -4 src/sys/ufs/ufs/ufs_vnops.c > > > > > > Is this worth a man page update? > > > > Undoubtedly. Does the attached look like enough? I'm not sure if we > > want to add a STANDARDS section for this when it's valid behaviour. >=20 > @@ -69,6 +69,10 @@ > 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 will return the value 0. > .Sh ERRORS > The > .Fn truncate >=20 > We need to mention truncate(2) does nothing for such files. Whoops, yeah of course. Index: src/lib/libc/sys/truncate.2 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /home/ncvs/src/lib/libc/sys/truncate.2,v retrieving revision 1.17 diff -u -r1.17 truncate.2 --- src/lib/libc/sys/truncate.2 20 Jan 2005 09:17:05 -0000 1.17 +++ src/lib/libc/sys/truncate.2 1 Jun 2006 10:04:18 -0000 @@ -32,7 +32,7 @@ .\" @(#)truncate.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD: src/lib/libc/sys/truncate.2,v 1.17 2005/01/20 09:17:05 ru Ex= p $ .\" -.Dd June 4, 1993 +.Dd June 1, 2006 .Dt TRUNCATE 2 .Os .Sh NAME @@ -69,6 +69,10 @@ 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 Ceri --=20 That must be wonderful! I don't understand it at all. -- Moliere --3E9L5busH6ECpa9r Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (FreeBSD) iD8DBQFEfrwZocfcwTS3JF8RAjFUAJ4zgrS354czkbBDt+FqGdEG6vEteQCaAvEz BQsr7o5yEwxb+Mdd5eo7tPw= =qA9i -----END PGP SIGNATURE----- --3E9L5busH6ECpa9r--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060601100617.GW21998>