Add notes on the different system call service routines that have

appeared over time.
This commit is contained in:
Michael Kerrisk 2007-06-27 05:12:36 +00:00
parent 3b5dffbcc9
commit b8f9d9dd7f
1 changed files with 25 additions and 0 deletions

View File

@ -416,6 +416,31 @@ directory,
does not return the file size in the
.I st_size
field; instead the field is returned with the value 0.
.SS Underlying kernel interface
Over time, increases in the size of the
.I stat
structure have led to three successive implementations of
.BR stat ():
.IR sys_stat ()
(slot
.IR __NR_oldstat ),
.IR sys_newstat ()
(slot
.IR __NR_stat ),
and
.IR sys_stat64()
(new in kernel 2.4; slot
.IR __NR_stat64 ),
with the last being the most current.
Glibc hides these changes from applications and ensures that
binary compatability is not broken for old binaries that
call the
.BR stat ()
library wrapper function.
Similar remarks apply for
.BR fstat (2)
and
.BR lstat (2).
.SH EXAMPLE
The following program calls
.BR stat (2)