From owner-man-jp-reviewer@jp.FreeBSD.org Fri May  6 03:44:54 2005
Received: (from daemon@localhost)
	by castle.jp.FreeBSD.org (8.11.6p2+3.4W/8.11.3) id j45Iis775895;
	Fri, 6 May 2005 03:44:54 +0900 (JST)
	(envelope-from owner-man-jp-reviewer@jp.FreeBSD.org)
Received: from t-mta1.odn.ne.jp (mfep1.odn.ne.jp [143.90.131.179])
	by castle.jp.FreeBSD.org (8.11.6p2+3.4W/8.11.3) with ESMTP/inet id j45IirX75887
	for <man-jp-reviewer@jp.FreeBSD.org>; Fri, 6 May 2005 03:44:53 +0900 (JST)
	(envelope-from n-kogane@syd.odn.ne.jp)
Received: from kces6.koganemaru.co.jp ([220.212.168.108])
          by t-mta1.odn.ne.jp with ESMTP
          id <20050505184453281.DAPZ.8089.t-mta1.odn.ne.jp@mta1.odn.ne.jp>
          for <man-jp-reviewer@jp.FreeBSD.org>;
          Fri, 6 May 2005 03:44:53 +0900
Received: by kces6.koganemaru.co.jp (Postfix, from userid 100)
	id 01844FE89; Fri,  6 May 2005 03:45:19 +0900 (JST)
To: man-jp-reviewer@jp.FreeBSD.org
MIME-Version: 1.0 (generated by MimeKit/1.8)
Content-Type: text/plain; charset=ISO-2022-JP
Message-Id: <20050505184519.01844FE89@kces6.koganemaru.co.jp>
From: n-kogane@syd.odn.ne.jp (Nobuyuki Koganemaru)
Reply-To: man-jp-reviewer@jp.FreeBSD.org
Precedence: list
Date: Fri, 6 May 2005 03:45:19 +0900
X-Sequence: man-jp-reviewer 4772
Subject: [man-jp-reviewer 4772] stat.2 Update to 5.4RC4
Sender: owner-man-jp-reviewer@jp.FreeBSD.org
X-Originator: n-kogane@syd.odn.ne.jp
X-Distribute: distribute version 2.1 (Alpha) patchlevel 24e+050320

$B>.6b4]$G$9!#(B

$B8e$m$K1QJ8$N:9J,$bIU$1$^$9!#(B

--- stat.2.orig	Fri May  6 02:16:00 2005
+++ stat.2	Fri May  6 03:14:54 2005
@@ -30,10 +30,10 @@
 .\" 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.4 2005/02/28 03:32:34 brueffer Exp %
 .\"
 .\" $FreeBSD: doc/ja_JP.eucJP/man/man2/stat.2,v 1.18 2004/04/24 16:03:05 kuriyama Exp $
-.Dd February 15, 2002
+.Dd November 15, 2004
 .Dt STAT 2
 .Os
 .Sh $BL>>N(B
@@ -84,7 +84,24 @@
 .In sys/stat.h
 $B$GDj5A$5$l!"%U%!%$%k$K4X$9$k>pJs$rJ];}$7$^$9!#(B
 .Pp
-.Fa struct stat
+$B%U%!%$%k%7%9%F%`$K4XO"$9$k(B
+.Vt "struct stat"
+$B$N%U%#!<%k%I$O0J2<$N$H$*$j$G$9(B:
+.Bl -tag -width ".Va st_nlink"
+.It Va st_dev
+$B%U%!%$%k$r4^$`%G%P%$%9$N?tCM(B ID$B!#(B
+.It Va st_ino
+$B%U%!%$%k$N(B i $B%N!<%IHV9f!#(B
+.It Va st_nlink
+$B%U%!%$%k$X$N%O!<%I%j%s%/$N?t!#(B
+.El
+.Pp
+.Va st_dev
+$B$H(B
+.Va st_ino
+$B%U%#!<%k%I$O$H$b$K%7%9%F%`Cf$GM#0l$N%U%!%$%k$rFCDj$7$^$9!#(B
+.Pp
+.Vt "struct stat"
 $B$N;~9o$K4X$9$k%U%#!<%k%I$O!"0J2<$N$H$*$j$G$9(B:
 .Bl -tag -width ".Va st_birthtime"
 .It Va st_atime
@@ -141,15 +158,28 @@
 .Pp
 .Vt "struct stat"
 $B$N%5%$%:$K4X$9$k%U%#!<%k%I$O!"0J2<$N$H$*$j$G$9(B:
-.Bl -tag -width XXXst_blksize
-.It st_blksize
+.Bl -tag -width ".Va st_blksize"
+.It Va st_size
+$B%P%$%H$GI=$5$l$k%U%!%$%k%5%$%:!#(B
+.It Va st_blksize
 $B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$9$k!#(B
+.It Fn S_ISLNK m
+$B%7%s%\%j%C%/%j%s%/$+$I$&$+%F%9%H$9$k!#(B
+.It Fn S_ISREG m
+$BDL>o$N%U%!%$%k$+$I$&$+%F%9%H$9$k!#(B
+.It Fn S_ISSOCK m
+$B%=%1%C%H$+$I$&$+%F%9%H$9$k!#(B
+.It Fn S_ISWHT m
+$B%[%o%$%H%"%&%H$+$I$&$+%F%9%H$9$k!#(B
+.El
+.Pp
+$B%^%/%m$O!"%F%9%H$,??$J$i(B 0 $B0J30!"$^$?$O%F%9%H$,56$J$i(B 0 $B$KI>2A$7$^$9!#(B
 .Sh $BLa$jCM(B
 .Rv -std
 .Sh $B8_49@-(B
 $B0JA0$N%P!<%8%g%s$N%7%9%F%`$G$O!"(B
-.Li st_dev ,
-.Li st_uid ,
-.Li st_gid ,
-.Li st_rdev ,
-.Li st_size ,
-.Li st_blksize ,
-.Li st_blocks
+.Va st_dev ,
+.Va st_uid ,
+.Va st_gid ,
+.Va st_rdev ,
+.Va st_size ,
+.Va st_blksize ,
+.Va st_blocks
 $B%U%#!<%k%I$KJL$N%?%$%W$r;HMQ$7$F$$$^$7$?!#(B
 .Sh $B%(%i!<(B
 .Fn stat
@@ -262,4 +318,3 @@
 $B%7%9%F%`%3!<%k$O(B
 .Bx 4.2
 $B$GEP>l$7$^$7$?!#(B
-.\" Amended by N.Kumagai 2000-3-18

diff -u /dskg/JMAN4/5.3-RELEASE/man2/stat.2 /dskg/JMAN4/5.4-RC4/man2/stat.2
--- /dskg/JMAN4/5.3-RELEASE/man2/stat.2	Fri Nov  5 10:24:23 2004
+++ /dskg/JMAN4/5.4-RC4/man2/stat.2	Mon May  2 05:53:48 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.4 2005/02/28 03:32:34 brueffer 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
+.Fa 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
--
($BM-(B)$B>.6b4]%3%s%T%e!<%?%(%s%8%K%"%j%s%0%5!<%S%9(B ($BJ!2,8)BgLn>k;T(B)
	$B>.6b4](B $B?.9,(B (Nobuyuki Koganemaru)
E-Mail: n-kogane@syd.odn.ne.jp
E-Mail: kogane@jp.FreeBSD.org
E-Mail: kogane@koganemaru.co.jp
URL: http://www.koganemaru.co.jp
