diff -ru 5.3_RC2/man2/chmod.2 5.3_stable_20050225/man2/chmod.2 --- 5.3_RC2/man2/chmod.2 Sun Oct 31 14:29:53 2004 +++ 5.3_stable_20050225/man2/chmod.2 Fri Feb 25 09:50:05 2005 @@ -30,9 +30,9 @@ .\" SUCH DAMAGE. .\" .\" @(#)chmod.2 8.1 (Berkeley) 6/4/93 -.\" %FreeBSD: src/lib/libc/sys/chmod.2,v 1.31 2004/07/02 23:52:13 ru Exp % +.\" %FreeBSD: src/lib/libc/sys/chmod.2,v 1.31.2.1 2005/01/05 19:20:57 trhodes Exp % .\" -.Dd June 4, 1993 +.Dd December 29, 2004 .Dt CHMOD 2 .Os .Sh NAME @@ -101,22 +101,21 @@ #define S_ISUID 0004000 /* set user id on execution */ #define S_ISGID 0002000 /* set group id on execution */ -#define S_ISVTX 0001000 /* sticky bit */ -#ifndef _POSIX_SOURCE -#define S_ISTXT 0001000 +#ifndef __BSD_VISIBLE +#define S_ISTXT 0001000 /* sticky bit */ #endif .Ed .Pp The .Fx VM system totally ignores the sticky bit -.Pq Dv ISVTX +.Pq Dv ISTXT for executables. On UFS-based file systems (FFS, LFS) the sticky bit may only be set upon directories. .Pp If mode -.Dv ISVTX +.Dv ISTXT (the `sticky bit') is set on a directory, an unprivileged user may not delete or rename files of other users in that directory. diff -ru 5.3_RC2/man2/mlock.2 5.3_stable_20050225/man2/mlock.2 --- 5.3_RC2/man2/mlock.2 Sun Oct 31 14:29:53 2004 +++ 5.3_stable_20050225/man2/mlock.2 Fri Feb 25 09:50:06 2005 @@ -30,7 +30,7 @@ .\" SUCH DAMAGE. .\" .\" @(#)mlock.2 8.2 (Berkeley) 12/11/93 -.\" %FreeBSD: src/lib/libc/sys/mlock.2,v 1.18 2004/08/10 16:38:19 green Exp % +.\" %FreeBSD: src/lib/libc/sys/mlock.2,v 1.18.2.1 2004/11/08 18:50:58 ceri Exp % .\" .Dd August 10, 2004 .Dt MLOCK 2 @@ -139,8 +139,8 @@ Some portion of the indicated address range is not allocated. .El .Sh "SEE ALSO" -.Xr mlockall 2, -.Xr munlockall 2, +.Xr mlockall 2 , +.Xr munlockall 2 , .Xr fork 2 , .Xr mincore 2 , .Xr minherit 2 , diff -ru 5.3_RC2/man2/read.2 5.3_stable_20050225/man2/read.2 --- 5.3_RC2/man2/read.2 Sun Oct 31 14:29:53 2004 +++ 5.3_stable_20050225/man2/read.2 Fri Feb 25 09:50:07 2005 @@ -30,9 +30,9 @@ .\" SUCH DAMAGE. .\" .\" @(#)read.2 8.4 (Berkeley) 2/26/94 -.\" %FreeBSD: src/lib/libc/sys/read.2,v 1.25 2004/07/02 23:52:13 ru Exp % +.\" %FreeBSD: src/lib/libc/sys/read.2,v 1.25.2.1 2004/11/13 11:55:41 yar Exp % .\" -.Dd February 26, 1994 +.Dd October 16, 2004 .Dt READ 2 .Os .Sh NAME @@ -215,7 +215,9 @@ system call may also return the following errors: .Bl -tag -width Er .It Bq Er EINVAL -The specified file offset is invalid. +The +.Fa offset +value was negative. .It Bq Er ESPIPE The file descriptor is associated with a pipe, socket, or FIFO. .El diff -ru 5.3_RC2/man2/send.2 5.3_stable_20050225/man2/send.2 --- 5.3_RC2/man2/send.2 Sun Oct 31 14:29:53 2004 +++ 5.3_stable_20050225/man2/send.2 Fri Feb 25 09:50:07 2005 @@ -30,7 +30,7 @@ .\" SUCH DAMAGE. .\" .\" From: @(#)send.2 8.2 (Berkeley) 2/21/94 -.\" %FreeBSD: src/lib/libc/sys/send.2,v 1.27 2004/07/02 23:52:13 ru Exp % +.\" %FreeBSD: src/lib/libc/sys/send.2,v 1.27.2.1 2005/01/31 00:27:01 keramida Exp % .\" .Dd February 15, 1995 .Dt SEND 2 @@ -181,6 +181,8 @@ but may be caused by transient congestion. .It Bq Er EHOSTUNREACH The remote host was unreachable. +.It Bq Er EISCONN +A destination address was specified and the socket is already connected. .It Bq Er ECONNREFUSED The socket received an ICMP destination unreachable message from the last message sent. diff -ru 5.3_RC2/man2/sendfile.2 5.3_stable_20050225/man2/sendfile.2 --- 5.3_RC2/man2/sendfile.2 Sun Oct 31 14:29:53 2004 +++ 5.3_stable_20050225/man2/sendfile.2 Fri Feb 25 09:50:07 2005 @@ -23,9 +23,9 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" %FreeBSD: src/lib/libc/sys/sendfile.2,v 1.23 2004/06/30 20:09:10 ru Exp % +.\" %FreeBSD: src/lib/libc/sys/sendfile.2,v 1.23.2.1 2004/11/13 11:48:56 yar Exp % .\" -.Dd November 5, 1998 +.Dd October 16, 2004 .Dt SENDFILE 2 .Os .Sh NAME @@ -51,13 +51,19 @@ The .Fa offset argument specifies where to begin in the file. +Should +.Fa offset +fall beyond the end of file, the system will return +success and report 0 bytes sent as described below. The .Fa nbytes argument specifies how many bytes of the file should be sent, with 0 having the special meaning of send until the end of file has been reached. .Pp An optional header and/or trailer can be sent before and after the file data by specifying -a pointer to a struct sf_hdtr, which has the following structure: +a pointer to a +.Vt "struct sf_hdtr" , +which has the following structure: .Pp .Bd -literal -offset indent -compact struct sf_hdtr { @@ -72,7 +78,9 @@ .Fa headers and .Fa trailers -pointers, if non-NULL, point to arrays of struct iovec structures. +pointers, if +.Pf non- Dv NULL , +point to arrays of struct iovec structures. See the .Fn writev system call for information on the iovec structure. @@ -82,7 +90,9 @@ and .Fa trl_cnt . .Pp -If non-NULL, the system will write the total number of bytes sent on the socket to the +If +.Pf non- Dv NULL , +the system will write the total number of bytes sent on the socket to the variable pointed to by .Fa sbytes . .Pp @@ -209,7 +219,7 @@ The .Fa offset argument -is negative or out of range. +is negative. .It Bq Er ENOTCONN The .Fa s diff -ru 5.3_RC2/man2/stat.2 5.3_stable_20050225/man2/stat.2 --- 5.3_RC2/man2/stat.2 Sun Oct 31 14:29:54 2004 +++ 5.3_stable_20050225/man2/stat.2 Fri Feb 25 09:50:07 2005 @@ -30,9 +30,9 @@ .\" SUCH DAMAGE. .\" .\" @(#)stat.2 8.4 (Berkeley) 5/1/95 -.\" %FreeBSD: src/lib/libc/sys/stat.2,v 1.36 2003/12/10 15:08:41 dds Exp % +.\" %FreeBSD: src/lib/libc/sys/stat.2,v 1.36.2.3 2004/11/25 10:11:23 yar Exp % .\" -.Dd February 15, 2002 +.Dd November 15, 2004 .Dt STAT 2 .Os .Sh NAME @@ -87,8 +87,26 @@ .In sys/stat.h and into which information is placed concerning the file. .Pp +The fields of +.Vt "struct stat" +related to the file system are as follows: +.Bl -tag -width ".Va st_nlink" +.It Va st_dev +The numeric ID of the device containing the file. +.It Va st_ino +The file's inode number. +.It Va st_nlink +The number of hard links to the file. +.El +.Pp +The +.Va st_dev +and +.Va st_ino +fields together identify the file uniquely within the system. +.Pp The time-related fields of -.Fa struct stat +.Vt "struct stat" are as follows: .Bl -tag -width ".Va st_birthtime" .It Va st_atime @@ -150,15 +168,29 @@ The size-related fields of the .Vt "struct stat" are as follows: -.Bl -tag -width XXXst_blksize -.It st_blksize +.Bl -tag -width ".Va st_blksize" +.It Va st_size +The file size in bytes. +.It Va st_blksize The optimal I/O block size for the file. -.It st_blocks +.It Va st_blocks The actual number of blocks allocated for the file in 512-byte units. As short symbolic links are stored in the inode, this number may be zero. .El .Pp +The access-related fields of +.Vt "struct stat" +are as follows: +.Bl -tag -width ".Va st_mode" +.It Va st_uid +The user ID of the file's owner. +.It Va st_gid +The group ID of the file. +.It Va st_mode +Status of the file (see below). +.El +.Pp The status information word .Fa st_mode has the following bits: @@ -185,18 +217,44 @@ .Xr access 2 and .Xr chmod 2 . +The following macros are available to test whether a +.Va st_mode +value passed in the +.Ar m +argument corresponds to a file of the specified type: +.Bl -tag -width ".Fn S_ISFIFO m" +.It Fn S_ISBLK m +Test for a block special file. +.It Fn S_ISCHR m +Test for a character special file. +.It Fn S_ISDIR m +Test for a directory. +.It Fn S_ISFIFO m +Test for a pipe or FIFO special file. +.It Fn S_ISLNK m +Test for a symbolic link. +.It Fn S_ISREG m +Test for a regular file. +.It Fn S_ISSOCK m +Test for a socket. +.It Fn S_ISWHT m +Test for a whiteout. +.El +.Pp +The macros evaluate to a non-zero value if the test is true +or to the value 0 if the test is false. .Sh RETURN VALUES .Rv -std .Sh COMPATIBILITY Previous versions of the system used different types for the -.Li st_dev , -.Li st_uid , -.Li st_gid , -.Li st_rdev , -.Li st_size , -.Li st_blksize +.Va st_dev , +.Va st_uid , +.Va st_gid , +.Va st_rdev , +.Va st_size , +.Va st_blksize and -.Li st_blocks +.Va st_blocks fields. .Sh ERRORS The diff -ru 5.3_RC2/man2/write.2 5.3_stable_20050225/man2/write.2 --- 5.3_RC2/man2/write.2 Sun Oct 31 14:29:54 2004 +++ 5.3_stable_20050225/man2/write.2 Fri Feb 25 09:50:07 2005 @@ -30,9 +30,9 @@ .\" SUCH DAMAGE. .\" .\" @(#)write.2 8.5 (Berkeley) 4/2/94 -.\" %FreeBSD: src/lib/libc/sys/write.2,v 1.26 2004/07/02 23:52:13 ru Exp % +.\" %FreeBSD: src/lib/libc/sys/write.2,v 1.26.2.1 2004/11/13 11:55:41 yar Exp % .\" -.Dd April 2, 1994 +.Dd October 16, 2004 .Dt WRITE 2 .Os .Sh NAME @@ -231,7 +231,9 @@ system call may also return the following errors: .Bl -tag -width Er .It Bq Er EINVAL -The specified file offset is invalid. +The +.Fa offset +value was negative. .It Bq Er ESPIPE The file descriptor is associated with a pipe, socket, or FIFO. .El