mirror of https://github.com/mkerrisk/man-pages
Add notes on the different system call service routines that have
appeared over time.
This commit is contained in:
parent
3b5dffbcc9
commit
b8f9d9dd7f
25
man2/stat.2
25
man2/stat.2
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue